syntax: update pretty-printer for the <T>::method
shorthand.
This commit is contained in:
parent
72d5f39be7
commit
0c6d1f3b3d
1 changed files with 6 additions and 3 deletions
|
@ -2048,9 +2048,12 @@ impl<'a> State<'a> {
|
||||||
{
|
{
|
||||||
try!(word(&mut self.s, "<"));
|
try!(word(&mut self.s, "<"));
|
||||||
try!(self.print_type(&qself.ty));
|
try!(self.print_type(&qself.ty));
|
||||||
try!(space(&mut self.s));
|
if qself.position > 0 {
|
||||||
try!(self.word_space("as"));
|
try!(space(&mut self.s));
|
||||||
try!(self.print_path(&path, false, 1));
|
try!(self.word_space("as"));
|
||||||
|
let depth = path.segments.len() - qself.position;
|
||||||
|
try!(self.print_path(&path, false, depth));
|
||||||
|
}
|
||||||
try!(word(&mut self.s, ">"));
|
try!(word(&mut self.s, ">"));
|
||||||
try!(word(&mut self.s, "::"));
|
try!(word(&mut self.s, "::"));
|
||||||
let item_segment = path.segments.last().unwrap();
|
let item_segment = path.segments.last().unwrap();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue