fix pretty print for qpath
This commit is contained in:
parent
55794e4396
commit
775f1e5acd
@ -2328,11 +2328,12 @@ fn print_qpath(&mut self, path: &ast::Path, qself: &ast::QSelf, colons_before_pa
|
|||||||
self.print_path(path, false, depth);
|
self.print_path(path, false, depth);
|
||||||
}
|
}
|
||||||
self.s.word(">");
|
self.s.word(">");
|
||||||
self.s.word("::");
|
for item_segment in &path.segments[qself.position..] {
|
||||||
let item_segment = path.segments.last().unwrap();
|
self.s.word("::");
|
||||||
self.print_ident(item_segment.ident);
|
self.print_ident(item_segment.ident);
|
||||||
if let Some(ref args) = item_segment.args {
|
if let Some(ref args) = item_segment.args {
|
||||||
self.print_generic_args(args, colons_before_params)
|
self.print_generic_args(args, colons_before_params)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
16
src/test/pretty/qpath-associated-type-bound.rs
Normal file
16
src/test/pretty/qpath-associated-type-bound.rs
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
// pp-exact
|
||||||
|
|
||||||
|
|
||||||
|
mod m {
|
||||||
|
pub trait Tr {
|
||||||
|
type Ts: super::Tu;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
trait Tu {
|
||||||
|
fn dummy() { }
|
||||||
|
}
|
||||||
|
|
||||||
|
fn foo<T: m::Tr>() { <T as m::Tr>::Ts::dummy(); }
|
||||||
|
|
||||||
|
fn main() { }
|
Loading…
Reference in New Issue
Block a user