Skip to content

Commit

Permalink
syntax: update pretty-printer for the <T>::method shorthand.
Browse files Browse the repository at this point in the history
  • Loading branch information
eddyb committed Feb 24, 2015
1 parent 72d5f39 commit 0c6d1f3
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/libsyntax/print/pprust.rs
Expand Up @@ -2048,9 +2048,12 @@ impl<'a> State<'a> {
{
try!(word(&mut self.s, "<"));
try!(self.print_type(&qself.ty));
try!(space(&mut self.s));
try!(self.word_space("as"));
try!(self.print_path(&path, false, 1));
if qself.position > 0 {
try!(space(&mut self.s));
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, "::"));
let item_segment = path.segments.last().unwrap();
Expand Down

0 comments on commit 0c6d1f3

Please sign in to comment.