Pretty-print $crate::foo::bar as ::foo::bar.
This commit is contained in:
parent
f10f50b426
commit
8a1acb2c69
3 changed files with 5 additions and 4 deletions
|
|
@ -1647,7 +1647,7 @@ impl<'a> State<'a> {
|
|||
if i > 0 {
|
||||
word(&mut self.s, "::")?
|
||||
}
|
||||
if segment.name != keywords::CrateRoot.name() {
|
||||
if segment.name != keywords::CrateRoot.name() && segment.name != "$crate" {
|
||||
self.print_name(segment.name)?;
|
||||
self.print_path_parameters(&segment.parameters, colons_before_params)?;
|
||||
}
|
||||
|
|
@ -1674,7 +1674,7 @@ impl<'a> State<'a> {
|
|||
if i > 0 {
|
||||
word(&mut self.s, "::")?
|
||||
}
|
||||
if segment.name != keywords::CrateRoot.name() {
|
||||
if segment.name != keywords::CrateRoot.name() && segment.name != "$crate" {
|
||||
self.print_name(segment.name)?;
|
||||
self.print_path_parameters(&segment.parameters, colons_before_params)?;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue