File tree Expand file tree Collapse file tree 3 files changed +21
-1
lines changed
compiler/rustc_resolve/src
src/test/rustdoc-ui/intra-doc Expand file tree Collapse file tree 3 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -3298,7 +3298,9 @@ impl<'a> Resolver<'a> {
32983298 PathResult :: NonModule ( path_res) if path_res. unresolved_segments ( ) == 0 => {
32993299 Some ( path_res. base_res ( ) )
33003300 }
3301- PathResult :: NonModule ( ..) | PathResult :: Failed { .. } => None ,
3301+ PathResult :: Module ( ModuleOrUniformRoot :: ExternPrelude )
3302+ | PathResult :: NonModule ( ..)
3303+ | PathResult :: Failed { .. } => None ,
33023304 PathResult :: Module ( ..) | PathResult :: Indeterminate => unreachable ! ( ) ,
33033305 }
33043306 }
Original file line number Diff line number Diff line change 1+ // Doc link path with empty prefix that resolves to "extern prelude" instead of a module.
2+
3+ // check-pass
4+ // edition:2018
5+
6+ /// [::Unresolved]
7+ //~^ WARN unresolved link to `::Unresolved`
8+ pub struct Item ;
Original file line number Diff line number Diff line change 1+ warning: unresolved link to `::Unresolved`
2+ --> $DIR/global-path.rs:6:6
3+ |
4+ LL | /// [::Unresolved]
5+ | ^^^^^^^^^^^^ no item named `` in scope
6+ |
7+ = note: `#[warn(rustdoc::broken_intra_doc_links)]` on by default
8+
9+ warning: 1 warning emitted
10+
You can’t perform that action at this time.
0 commit comments