fix pretty print for qpath
This commit is contained in:
parent
55794e4396
commit
775f1e5acd
2 changed files with 22 additions and 5 deletions
|
@ -2328,11 +2328,12 @@ impl<'a> State<'a> {
|
|||
self.print_path(path, false, depth);
|
||||
}
|
||||
self.s.word(">");
|
||||
self.s.word("::");
|
||||
let item_segment = path.segments.last().unwrap();
|
||||
self.print_ident(item_segment.ident);
|
||||
if let Some(ref args) = item_segment.args {
|
||||
self.print_generic_args(args, colons_before_params)
|
||||
for item_segment in &path.segments[qself.position..] {
|
||||
self.s.word("::");
|
||||
self.print_ident(item_segment.ident);
|
||||
if let Some(ref args) = item_segment.args {
|
||||
self.print_generic_args(args, colons_before_params)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue