diff options
| author | Nick Cameron <ncameron@mozilla.com> | 2014-12-18 17:55:04 +1300 |
|---|---|---|
| committer | Nick Cameron <ncameron@mozilla.com> | 2014-12-30 13:06:24 +1300 |
| commit | ed8f5039115308ca9d5591126e4d8a77864d4730 (patch) | |
| tree | fef6c67dd64068ff73c4509d078d25ba88fa4f21 /src/libsyntax/print/pprust.rs | |
| parent | 71123902e17ad339649f33423995eac78da40e3c (diff) | |
| download | rust-ed8f5039115308ca9d5591126e4d8a77864d4730.tar.gz rust-ed8f5039115308ca9d5591126e4d8a77864d4730.zip | |
Add hypothetical support for ranges with only an upper bound
Note that this doesn't add the surface syntax.
Diffstat (limited to 'src/libsyntax/print/pprust.rs')
| -rw-r--r-- | src/libsyntax/print/pprust.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs index 623f20bccd2..a4b349c5f23 100644 --- a/src/libsyntax/print/pprust.rs +++ b/src/libsyntax/print/pprust.rs @@ -1760,7 +1760,9 @@ impl<'a> State<'a> { try!(word(&mut self.s, "]")); } ast::ExprRange(ref start, ref end) => { - try!(self.print_expr(&**start)); + if let &Some(ref e) = start { + try!(self.print_expr(&**e)); + } try!(word(&mut self.s, "..")); if let &Some(ref e) = end { try!(self.print_expr(&**e)); |
