@@ -32,7 +32,7 @@ pub fn demangle(s: &str) -> Result<(Demangle, &str), Invalid> {
3232
3333 // Paths always start with uppercase characters.
3434 match inner. as_bytes ( ) [ 0 ] {
35- b'A' ... b'Z' => { }
35+ b'A' ..= b'Z' => { }
3636 _ => return Err ( Invalid ) ,
3737 }
3838
@@ -50,7 +50,7 @@ pub fn demangle(s: &str) -> Result<(Demangle, &str), Invalid> {
5050
5151 // Instantiating crate (paths always start with uppercase characters).
5252 match parser. sym . as_bytes ( ) . get ( parser. next ) {
53- Some ( & b'A' ... b'Z' ) => {
53+ Some ( & ( b'A' ..= b'Z' ) ) => {
5454 try!( parser. skip_path ( ) ) ;
5555 }
5656 _ => { }
@@ -159,8 +159,8 @@ impl<'s> Ident<'s> {
159159 let t = min ( max ( k. saturating_sub ( bias) , t_min) , t_max) ;
160160
161161 let d = match punycode_bytes. next ( ) {
162- Some ( d @ b'a' ... b'z' ) => d - b'a' ,
163- Some ( d @ b'0' ... b'9' ) => 26 + ( d - b'0' ) ,
162+ Some ( d @ b'a' ..= b'z' ) => d - b'a' ,
163+ Some ( d @ b'0' ..= b'9' ) => 26 + ( d - b'0' ) ,
164164 _ => return Err ( ( ) ) ,
165165 } ;
166166 let d = d as usize ;
@@ -295,7 +295,7 @@ impl<'s> Parser<'s> {
295295 let start = self . next ;
296296 loop {
297297 match try!( self . next ( ) ) {
298- b'0' ... b'9' | b'a' ... b'f' => { }
298+ b'0' ..= b'9' | b'a' ..= b'f' => { }
299299 b'_' => break ,
300300 _ => return Err ( Invalid ) ,
301301 }
@@ -305,7 +305,7 @@ impl<'s> Parser<'s> {
305305
306306 fn digit_10 ( & mut self ) -> Result < u8 , Invalid > {
307307 let d = match self . peek ( ) {
308- Some ( d @ b'0' ... b'9' ) => d - b'0' ,
308+ Some ( d @ b'0' ..= b'9' ) => d - b'0' ,
309309 _ => return Err ( Invalid ) ,
310310 } ;
311311 self . next += 1 ;
@@ -314,9 +314,9 @@ impl<'s> Parser<'s> {
314314
315315 fn digit_62 ( & mut self ) -> Result < u8 , Invalid > {
316316 let d = match self . peek ( ) {
317- Some ( d @ b'0' ... b'9' ) => d - b'0' ,
318- Some ( d @ b'a' ... b'z' ) => 10 + ( d - b'a' ) ,
319- Some ( d @ b'A' ... b'Z' ) => 10 + 26 + ( d - b'A' ) ,
317+ Some ( d @ b'0' ..= b'9' ) => d - b'0' ,
318+ Some ( d @ b'a' ..= b'z' ) => 10 + ( d - b'a' ) ,
319+ Some ( d @ b'A' ..= b'Z' ) => 10 + 26 + ( d - b'A' ) ,
320320 _ => return Err ( Invalid ) ,
321321 } ;
322322 self . next += 1 ;
@@ -351,10 +351,10 @@ impl<'s> Parser<'s> {
351351 fn namespace ( & mut self ) -> Result < Option < char > , Invalid > {
352352 match try!( self . next ( ) ) {
353353 // Special namespaces, like closures and shims.
354- ns @ b'A' ... b'Z' => Ok ( Some ( ns as char ) ) ,
354+ ns @ b'A' ..= b'Z' => Ok ( Some ( ns as char ) ) ,
355355
356356 // Implementation-specific/unspecified namespaces.
357- b'a' ... b'z' => Ok ( None ) ,
357+ b'a' ..= b'z' => Ok ( None ) ,
358358
359359 _ => Err ( Invalid ) ,
360360 }
0 commit comments