Skip to content

Commit 0a1798d

Browse files
committed
Fix pretty printing of HRTB syntax
1 parent 3925b4d commit 0a1798d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/libsyntax/print/pprust.rs

+5
Original file line numberDiff line numberDiff line change
@@ -1005,8 +1005,13 @@ impl<'a> State<'a> {
10051005
fn print_poly_trait_ref(&mut self, t: &ast::PolyTraitRef) -> IoResult<()> {
10061006
if !t.bound_lifetimes.is_empty() {
10071007
try!(word(&mut self.s, "for<"));
1008+
let mut comma = false;
10081009
for lifetime_def in t.bound_lifetimes.iter() {
1010+
if comma {
1011+
try!(self.word_space(","))
1012+
}
10091013
try!(self.print_lifetime_def(lifetime_def));
1014+
comma = true;
10101015
}
10111016
try!(word(&mut self.s, ">"));
10121017
}

0 commit comments

Comments
 (0)