about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-12-17 08:34:04 -0800
committerAlex Crichton <alex@alexcrichton.com>2014-12-17 11:50:25 -0800
commitb5302217f026ba00e9f0514992b5f8226f7cb541 (patch)
treee138ac4c2c083a2cfdac32ec98879ff576018f9b /src/libsyntax
parentbe0c8fb50729c76ad22c4f5c2294626dc32524aa (diff)
parent0a1798dd1e7fad9f04a99c58623661ffb1747de0 (diff)
rollup merge of #19821: bkoropoff/issue-19791
Normalize late-bound regions in bare functions, stack closures, and traits and include them in the generated hash.

Closes #19791

r? @nikomatsakis (does my normalization make sense?)
cc @alexcrichton
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/print/pprust.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs
index db122f271a9..b08cf1112fb 100644
--- a/src/libsyntax/print/pprust.rs
+++ b/src/libsyntax/print/pprust.rs
@@ -1005,8 +1005,13 @@ impl<'a> State<'a> {
     fn print_poly_trait_ref(&mut self, t: &ast::PolyTraitRef) -> IoResult<()> {
         if !t.bound_lifetimes.is_empty() {
             try!(word(&mut self.s, "for<"));
+            let mut comma = false;
             for lifetime_def in t.bound_lifetimes.iter() {
+                if comma {
+                    try!(self.word_space(","))
+                }
                 try!(self.print_lifetime_def(lifetime_def));
+                comma = true;
             }
             try!(word(&mut self.s, ">"));
         }