You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I expected to see this happen: No warning is reported by cargo doc.
Instead, this happened: The following warning is reported:
warning: unresolved link to `bar`
--> src/issue.rs:1:7
|
1 | /// [`bar`]
| ^^^ no item named `bar` in scope
|
= note: `#[warn(rustdoc::broken_intra_doc_links)]` on by default
= note: `macro_rules` named `bar` exists in this crate, but it is not in scope at this link's location
Despite the warning, the generated link does work as expected.
This does not happen if I change [`bar`] to [`crate::bar`].
I suspect that the code you posted is not in the root module, right?
In that case bar is indeed not in scope at the location of the [`bar`] link, it's an intentional change made in #96676.
Despite the warning, the generated link does work as expected.
This is a compatibility measure to keep stuff on docs.rs working if possible.
I tried this code:
I expected to see this happen: No warning is reported by
cargo doc
.Instead, this happened: The following warning is reported:
Despite the warning, the generated link does work as expected.
This does not happen if I change
[`bar`]
to[`crate::bar`]
.Meta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: