File tree 3 files changed +21
-1
lines changed
compiler/rustc_resolve/src
src/test/rustdoc-ui/intra-doc
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> {
3298
3298
PathResult :: NonModule ( path_res) if path_res. unresolved_segments ( ) == 0 => {
3299
3299
Some ( path_res. base_res ( ) )
3300
3300
}
3301
- PathResult :: NonModule ( ..) | PathResult :: Failed { .. } => None ,
3301
+ PathResult :: Module ( ModuleOrUniformRoot :: ExternPrelude )
3302
+ | PathResult :: NonModule ( ..)
3303
+ | PathResult :: Failed { .. } => None ,
3302
3304
PathResult :: Module ( ..) | PathResult :: Indeterminate => unreachable ! ( ) ,
3303
3305
}
3304
3306
}
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