about summary refs log tree commit diff
path: root/src/libsyntax/parse/lexer
diff options
context:
space:
mode:
authorZack M. Davis <code@zackmdavis.net>2018-05-28 19:42:11 -0700
committerZack M. Davis <code@zackmdavis.net>2018-06-26 07:53:30 -0700
commit057715557b51af125847da6d19b2e016283c5ae7 (patch)
treedfe0cc5a807ac7ed47bb77893f1c69198be825f6 /src/libsyntax/parse/lexer
parent764232cb2a8407c72b9fea68835e686240e30ef3 (diff)
downloadrust-057715557b51af125847da6d19b2e016283c5ae7.tar.gz
rust-057715557b51af125847da6d19b2e016283c5ae7.zip
migrate codebase to `..=` inclusive range patterns
These were stabilized in March 2018's #47813, and are the Preferred Way
to Do It going forward (q.v. #51043).
Diffstat (limited to 'src/libsyntax/parse/lexer')
-rw-r--r--src/libsyntax/parse/lexer/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsyntax/parse/lexer/mod.rs b/src/libsyntax/parse/lexer/mod.rs
index 5353ff9a1e1..c09cfd910d2 100644
--- a/src/libsyntax/parse/lexer/mod.rs
+++ b/src/libsyntax/parse/lexer/mod.rs
@@ -266,7 +266,7 @@ impl<'a> StringReader<'a> {
     /// Pushes a character to a message string for error reporting
     fn push_escaped_char_for_msg(m: &mut String, c: char) {
         match c {
-            '\u{20}'...'\u{7e}' => {
+            '\u{20}'..='\u{7e}' => {
                 // Don't escape \, ' or " for user-facing messages
                 m.push(c);
             }
@@ -779,7 +779,7 @@ impl<'a> StringReader<'a> {
                     base = 16;
                     num_digits = self.scan_digits(16, 16);
                 }
-                '0'...'9' | '_' | '.' | 'e' | 'E' => {
+                '0'..='9' | '_' | '.' | 'e' | 'E' => {
                     num_digits = self.scan_digits(10, 10) + 1;
                 }
                 _ => {