about summary refs log tree commit diff
path: root/src/libsyntax/print/pprust.rs
diff options
context:
space:
mode:
authorJared Roesch <roeschinc@gmail.com>2014-12-20 02:48:43 -0800
committerJared Roesch <roeschinc@gmail.com>2014-12-20 03:54:39 -0800
commitd87b308b67ab070d67ab66062b33f64e5bc621e4 (patch)
tree13fa47333d28c9926b8a26718f355250ad20247d /src/libsyntax/print/pprust.rs
parente0cac488ac6ca16507da390429565b7879f76bb4 (diff)
downloadrust-d87b308b67ab070d67ab66062b33f64e5bc621e4.tar.gz
rust-d87b308b67ab070d67ab66062b33f64e5bc621e4.zip
Add support for multiple region bounds in where clauses
Diffstat (limited to 'src/libsyntax/print/pprust.rs')
-rw-r--r--src/libsyntax/print/pprust.rs11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs
index d619a386664..f27a476dbdd 100644
--- a/src/libsyntax/print/pprust.rs
+++ b/src/libsyntax/print/pprust.rs
@@ -2444,11 +2444,18 @@ impl<'a> State<'a> {
                     try!(self.print_bounds(":", bounds.as_slice()));
                 }
                 &ast::WherePredicate::RegionPredicate(ast::WhereRegionPredicate{ref lifetime,
-                                                                                ref bound,
+                                                                                ref bounds,
                                                                                 ..}) => {
                     try!(self.print_lifetime(lifetime));
                     try!(word(&mut self.s, ":"));
-                    try!(self.print_lifetime(bound));
+
+                    for (i, bound) in bounds.iter().enumerate() {
+                        try!(self.print_lifetime(bound));
+
+                        if i != 0 {
+                            try!(word(&mut self.s, ":"));
+                        }
+                    }
                 }
                 &ast::WherePredicate::EqPredicate(ast::WhereEqPredicate{ref path, ref ty, ..}) => {
                     try!(self.print_path(path, false));