rustdoc: do not write {{root}}
in pub use ::foo
docs
This commit is contained in:
parent
7417110cef
commit
ae38f35720
2 changed files with 4 additions and 1 deletions
|
@ -18,6 +18,7 @@ use rustc_hir::def_id::DefId;
|
|||
use rustc_middle::ty;
|
||||
use rustc_middle::ty::DefIdTree;
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
use rustc_span::symbol::kw;
|
||||
use rustc_span::{sym, Symbol};
|
||||
use rustc_target::spec::abi::Abi;
|
||||
|
||||
|
@ -679,7 +680,7 @@ fn resolved_path<'cx>(
|
|||
|
||||
if print_all {
|
||||
for seg in &path.segments[..path.segments.len() - 1] {
|
||||
write!(w, "{}::", seg.name)?;
|
||||
write!(w, "{}::", if seg.name == kw::PathRoot { "" } else { seg.name.as_str() })?;
|
||||
}
|
||||
}
|
||||
if w.alternate() {
|
||||
|
|
2
src/test/rustdoc/issue-95873.rs
Normal file
2
src/test/rustdoc/issue-95873.rs
Normal file
|
@ -0,0 +1,2 @@
|
|||
// @!has issue_95873/index.html '{{root}}'
|
||||
pub use ::std as x;
|
Loading…
Add table
Add a link
Reference in a new issue