resolve: Fix resolution of empty paths passed from rustdoc

This commit is contained in:
Vadim Petrochenkov 2022-04-05 15:38:18 +03:00
parent 634770c0a7
commit 7faaf8f4aa
3 changed files with 21 additions and 1 deletions

View file

@ -0,0 +1,8 @@
// Doc link path with empty prefix that resolves to "extern prelude" instead of a module.
// check-pass
// edition:2018
/// [::Unresolved]
//~^ WARN unresolved link to `::Unresolved`
pub struct Item;

View file

@ -0,0 +1,10 @@
warning: unresolved link to `::Unresolved`
--> $DIR/global-path.rs:6:6
|
LL | /// [::Unresolved]
| ^^^^^^^^^^^^ no item named `` in scope
|
= note: `#[warn(rustdoc::broken_intra_doc_links)]` on by default
warning: 1 warning emitted