diff options
| author | Badel2 <2badel2@gmail.com> | 2017-09-21 12:13:26 +0200 |
|---|---|---|
| committer | Badel2 <2badel2@gmail.com> | 2017-09-22 22:05:18 +0200 |
| commit | 7aabf572789dcae24cc8ce247f7d86bcc5d49a17 (patch) | |
| tree | d47c849b0da920d01dc0fb96d09b3c120d526f92 /src/libsyntax/print | |
| parent | 4737c5a068a38e4b004180b3f39bb0974190b06e (diff) | |
| download | rust-7aabf572789dcae24cc8ce247f7d86bcc5d49a17.tar.gz rust-7aabf572789dcae24cc8ce247f7d86bcc5d49a17.zip | |
Add information about the syntax used in ranges
... or ..=
Diffstat (limited to 'src/libsyntax/print')
| -rw-r--r-- | src/libsyntax/print/pprust.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs index cc4b34854fc..959dd4ef30f 100644 --- a/src/libsyntax/print/pprust.rs +++ b/src/libsyntax/print/pprust.rs @@ -11,7 +11,7 @@ pub use self::AnnNode::*; use abi::{self, Abi}; -use ast::{self, BlockCheckMode, PatKind, RangeEnd}; +use ast::{self, BlockCheckMode, PatKind, RangeEnd, RangeSyntax}; use ast::{SelfKind, RegionTyParamBound, TraitTyParamBound, TraitBoundModifier}; use ast::Attribute; use util::parser::{self, AssocOp, Fixity}; @@ -2590,7 +2590,8 @@ impl<'a> State<'a> { self.print_expr(begin)?; self.s.space()?; match *end_kind { - RangeEnd::Included => self.s.word("...")?, + RangeEnd::Included(RangeSyntax::DotDotDot) => self.s.word("...")?, + RangeEnd::Included(RangeSyntax::DotDotEq) => self.s.word("..=")?, RangeEnd::Excluded => self.s.word("..")?, } self.print_expr(end)?; |
