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
warning: unresolved link to `file::into_iter`
--> tmp.rs:1:6
|
1 | /// [type@file::into_iter]
| ^^^^^^^^^^^^^^^^^^^^ `file` is a macro, not a module or type, and cannot have associated items
Rustdoc looks in different namespaces for diagnostics: https://github.com/rust-lang/rust/blob/66a9cfadf89439ad3ea1b67b996c0a90ca4763bf/src/librustdoc/passes/collect_intra_doc_links.rs#L1569-L1572
So this is handled properly:
However (after #76955),
resolution_failureonly looks at other namespaces if there are multiple path segments. So https://github.com/rust-lang/rust/blob/66a9cfadf89439ad3ea1b67b996c0a90ca4763bf/src/librustdoc/passes/collect_intra_doc_links.rs#L1114 and https://github.com/rust-lang/rust/blob/66a9cfadf89439ad3ea1b67b996c0a90ca4763bf/src/librustdoc/passes/collect_intra_doc_links.rs#L1242-L1244 are still necessary, because they handle cases likevalue@fileandtype@file.It would be nice to clean this up so that
WrongNamespaceis only handled in one place, inresolution_failure.Originally posted by @jyn514 in #76955 (comment)