Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate intra-doc link errors in std #78096

Closed
camelid opened this issue Oct 19, 2020 · 6 comments
Closed

Duplicate intra-doc link errors in std #78096

camelid opened this issue Oct 19, 2020 · 6 comments
Labels
A-diagnostics Area: Messages for errors, warnings, and lints A-intra-doc-links Area: Intra-doc links, the ability to link to items in docs by name C-bug Category: This is a bug. D-verbose Diagnostics: Too much output caused by a single piece of incorrect code. E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@camelid
Copy link
Member

camelid commented Oct 19, 2020

I found this while working on #78093:

error: unresolved link to `use`
  --> library/std/src/keyword_docs.rs:23:74
   |
23 | /// Other places `as` is used include as extra syntax for [`crate`] and [`use`], or to change
   |                                                                          ^^^^^ the module `std` contains no item named `use`
   |
   = note: `-D broken-intra-doc-links` implied by `-D warnings`
   = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`

error: unresolved link to `use`
  --> library/std/src/keyword_docs.rs:23:74
   |
23 | /// Other places `as` is used include as extra syntax for [`crate`] and [`use`], or to change
   |                                                                          ^^^^^ the module `std` contains no item named `use`
   |
   = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`

Not sure how to reproduce; it's probably some weird state issue.

@camelid camelid added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. C-bug Category: This is a bug. A-intra-doc-links Area: Intra-doc links, the ability to link to items in docs by name E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example labels Oct 19, 2020
@jyn514 jyn514 added A-diagnostics Area: Messages for errors, warnings, and lints D-verbose Diagnostics: Too much output caused by a single piece of incorrect code. labels Oct 19, 2020
@camelid
Copy link
Member Author

camelid commented Nov 5, 2020

Another instance of this:

error: `f32` is both a module and a builtin type
   --> library/std/src/primitive_docs.rs:834:12
    |
834 | /// `f32`](f32) or [Wikipedia on double precision
    |            ^^^ ambiguous link
    |
    = note: `-D broken-intra-doc-links` implied by `-D warnings`
help: to link to the module, prefix with `mod@`
    |
834 | /// `f32`](mod@f32) or [Wikipedia on double precision
    |            ^^^^^^^
help: to link to the builtin type, prefix with `prim@`
    |
834 | /// `f32`](prim@f32) or [Wikipedia on double precision
    |            ^^^^^^^^

error: `f32` is both a module and a builtin type
   --> library/std/src/primitive_docs.rs:834:12
    |
834 | /// `f32`](f32) or [Wikipedia on double precision
    |            ^^^ ambiguous link
    |
help: to link to the module, prefix with `mod@`
    |
834 | /// `f32`](mod@f32) or [Wikipedia on double precision
    |            ^^^^^^^
help: to link to the builtin type, prefix with `prim@`
    |
834 | /// `f32`](prim@f32) or [Wikipedia on double precision
    |            ^^^^^^^^

error: aborting due to 2 previous errors

error: could not document `std`

@jyn514
Copy link
Member

jyn514 commented Dec 2, 2020

I think this might be a duplicate of #77681.

@camelid
Copy link
Member Author

camelid commented Dec 2, 2020

I think I ran into this the other day with a different project and I don't think it was the same issue as #77681. It's hard to make repros :/

@jyn514
Copy link
Member

jyn514 commented Jul 2, 2021

@camelid have you run into this recently? I'm inclined to close otherwise.

@camelid
Copy link
Member Author

camelid commented Jul 3, 2021

I have not, though it's possible that the original sample from the standard library still reproduces.

@jyn514
Copy link
Member

jyn514 commented Jul 3, 2021

Ok. I'm going to close this until you run into it again, it's not really actionable right now.

@jyn514 jyn514 closed this as completed Jul 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints A-intra-doc-links Area: Intra-doc links, the ability to link to items in docs by name C-bug Category: This is a bug. D-verbose Diagnostics: Too much output caused by a single piece of incorrect code. E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants