We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
{{root}}
pub use ::foo
1 parent 7417110 commit ae38f35Copy full SHA for ae38f35
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 '{{root}}'
2
+pub use ::std as x;
0 commit comments