Skip to content

Conversation

jyn514
Copy link
Member

@jyn514 jyn514 commented Jun 26, 2020

Closes #73676

@bors rollup=always

@rust-highfive
Copy link
Contributor

r? @eddyb

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 26, 2020
@jyn514
Copy link
Member Author

jyn514 commented Jun 26, 2020

Before this change:

image

After this change:

image

@eddyb
Copy link
Member

eddyb commented Jun 26, 2020

Doesn't ```rust require something else to have it ignored as a doctest?

r? @Manishearth

@rust-highfive rust-highfive assigned Manishearth and unassigned eddyb Jun 26, 2020
@jyn514
Copy link
Member Author

jyn514 commented Jun 26, 2020

I noticed a bunch more warnings while documenting this:

Warnings
warning: `[exhaustiveness]` cannot be resolved, ignoring it. --> src/librustc_mir_build/hair/pattern/_match.rs:7:69 | 7 | //! (a) the patterns cover every possible constructor for the type [exhaustiveness] | ^^^^^^^^^^^^^^ cannot be resolved, ignoring | = note: `#[warn(intra_doc_link_resolution_failure)]` on by default = help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]` warning: `[usefulness]` cannot be resolved, ignoring it. --> src/librustc_mir_build/hair/pattern/_match.rs:8:36 | 8 | //! (b) each pattern is necessary [usefulness] | ^^^^^^^^^^ cannot be resolved, ignoring | = help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]` warning: could not parse code block as Rust code --> src/librustc_mir_build/hair/pattern/_match.rs:113:9 | 113 | //! For example, the first pattern above initially gives a stack `[(Some(true), _)]`. If we | _________^ 114 | | //! pop the tuple constructor, we are left with `[Some(true), _]`, and if we then pop the 115 | | //! `Some` constructor we get `[true, _]`. If we had popped `None` instead, we would get 116 | | //! nothing back. ... | 149 | | //! Note that the OR-patterns are not always used directly in Rust, but are used to derive the 150 | | //! exhaustive integer matching rules, so they're written here for posterity. | |_________________________________________________________________________________^ | = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: character literal may only contain one codepoint = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: \u{2260} = note: error from rustc: unterminated character literal warning: could not parse code block as Rust code --> src/librustc_mir_build/hair/pattern/_match.rs:179:9 | 179 | //! For example, if `P` is: | _________^ 180 | | //! [ 181 | | //! [Some(true), _], 182 | | //! [None, 0], ... | 229 | | //! `U(P, p) := U(P, (r_1, p_2, .., p_n)) 230 | | //! || U(P, (r_2, p_2, .., p_n))` | |____________________________________________________^ | = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: \u{2203} = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` = note: error from rustc: unknown start of token: ` warning: 4 warnings emitted 

Are these tracked anywhere? Some of those look like broken links.

cc @GuillaumeGomez

@jyn514
Copy link
Member Author

jyn514 commented Jun 26, 2020

Doesn't ```rust require something else to have it ignored as a doctest?

Oh good point, I'll change it to ignore.

@Manishearth
Copy link
Member

@bors r+ rollup=always

@bors
Copy link
Collaborator

bors commented Jun 26, 2020

📌 Commit d279b3c has been approved by Manishearth

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 26, 2020
@Manishearth
Copy link
Member

@jyn514 I don't think these are tracked, but feel free to fix them!

bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 26, 2020
…arth Rollup of 13 pull requests Successful merges: - rust-lang#72620 (Omit DW_AT_linkage_name when it is the same as DW_AT_name) - rust-lang#72967 (Don't move cursor in search box when using arrows to navigate results) - rust-lang#73102 (proc_macro: Stop flattening groups with dummy spans) - rust-lang#73297 (Support configurable deny-warnings for all in-tree crates.) - rust-lang#73507 (Cleanup MinGW LLVM linkage workaround) - rust-lang#73588 (Fix handling of reserved registers for ARM inline asm) - rust-lang#73597 (Record span of `const` kw in GenericParamKind) - rust-lang#73629 (Make AssocOp Copy) - rust-lang#73681 (Update Chalk to 0.14) - rust-lang#73707 (Fix links in `SliceIndex` documentation) - rust-lang#73719 (emitter: column width defaults to 140) - rust-lang#73729 (disable collectionbenches for android) - rust-lang#73748 (Add code block to code in documentation of `List::rebase_onto`) Failed merges: r? @ghost
@GuillaumeGomez
Copy link
Member

They're not tracked for the moment until we have the intra-doc links stabilized. I definitely plan to deny this warning as soon as it's stable. :)

@bors bors merged commit a7eee3c into rust-lang:master Jun 26, 2020
@jyn514 jyn514 deleted the doc-fix branch June 26, 2020 14:13
flip1995 pushed a commit to flip1995/rust that referenced this pull request Jul 14, 2020
…arth Rollup of 13 pull requests Successful merges: - rust-lang#72620 (Omit DW_AT_linkage_name when it is the same as DW_AT_name) - rust-lang#72967 (Don't move cursor in search box when using arrows to navigate results) - rust-lang#73102 (proc_macro: Stop flattening groups with dummy spans) - rust-lang#73297 (Support configurable deny-warnings for all in-tree crates.) - rust-lang#73507 (Cleanup MinGW LLVM linkage workaround) - rust-lang#73588 (Fix handling of reserved registers for ARM inline asm) - rust-lang#73597 (Record span of `const` kw in GenericParamKind) - rust-lang#73629 (Make AssocOp Copy) - rust-lang#73681 (Update Chalk to 0.14) - rust-lang#73707 (Fix links in `SliceIndex` documentation) - rust-lang#73719 (emitter: column width defaults to 140) - rust-lang#73729 (disable collectionbenches for android) - rust-lang#73748 (Add code block to code in documentation of `List::rebase_onto`) Failed merges: r? @ghost
@cuviper cuviper added this to the 1.46 milestone May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

7 participants