We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
<T>::method
1 parent 72d5f39 commit 0c6d1f3Copy full SHA for 0c6d1f3
src/libsyntax/print/pprust.rs
@@ -2048,9 +2048,12 @@ impl<'a> State<'a> {
2048
{
2049
try!(word(&mut self.s, "<"));
2050
try!(self.print_type(&qself.ty));
2051
- try!(space(&mut self.s));
2052
- try!(self.word_space("as"));
2053
- try!(self.print_path(&path, false, 1));
+ if qself.position > 0 {
+ try!(space(&mut self.s));
+ try!(self.word_space("as"));
2054
+ let depth = path.segments.len() - qself.position;
2055
+ try!(self.print_path(&path, false, depth));
2056
+ }
2057
try!(word(&mut self.s, ">"));
2058
try!(word(&mut self.s, "::"));
2059
let item_segment = path.segments.last().unwrap();
0 commit comments