We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents dc1f98c + c2a9a68 commit 875b22fCopy full SHA for 875b22f
src/librustdoc/html/format.rs
@@ -18,6 +18,7 @@ use rustc_hir::def_id::DefId;
18
use rustc_middle::ty;
19
use rustc_middle::ty::DefIdTree;
20
use rustc_middle::ty::TyCtxt;
21
+use rustc_span::symbol::kw;
22
use rustc_span::{sym, Symbol};
23
use rustc_target::spec::abi::Abi;
24
@@ -679,7 +680,7 @@ fn resolved_path<'cx>(
679
680
681
if print_all {
682
for seg in &path.segments[..path.segments.len() - 1] {
- write!(w, "{}::", seg.name)?;
683
+ write!(w, "{}::", if seg.name == kw::PathRoot { "" } else { seg.name.as_str() })?;
684
}
685
686
if w.alternate() {
src/test/rustdoc/issue-95873.rs
@@ -0,0 +1,2 @@
1
+// @has issue_95873/index.html "//*[@class='item-left import-item']" "pub use ::std as x;"
2
+pub use ::std as x;
0 commit comments