diff --git a/src/libcore/ascii.rs b/src/libcore/ascii.rs index e78dfd1ed4abf..4d10a03f77f84 100644 --- a/src/libcore/ascii.rs +++ b/src/libcore/ascii.rs @@ -108,7 +108,7 @@ pub fn escape_default(c: u8) -> EscapeDefault { fn hexify(b: u8) -> u8 { match b { - 0..=9 => b'0' + b, + ..=9 => b'0' + b, _ => b'a' + b - 10, } } diff --git a/src/libcore/lib.rs b/src/libcore/lib.rs index 6edf253d4bb80..181c7d64cbb09 100644 --- a/src/libcore/lib.rs +++ b/src/libcore/lib.rs @@ -84,6 +84,7 @@ #![feature(doc_spotlight)] #![feature(extern_types)] #![feature(fundamental)] +#![feature(half_open_range_patterns)] #![feature(intrinsics)] #![feature(try_find)] #![feature(is_sorted)] diff --git a/src/librustc_target/abi/mod.rs b/src/librustc_target/abi/mod.rs index 3f44339bf4cc2..f3b65560ded1f 100644 --- a/src/librustc_target/abi/mod.rs +++ b/src/librustc_target/abi/mod.rs @@ -470,10 +470,10 @@ impl Integer { /// Finds the smallest Integer type which can represent the unsigned value. pub fn fit_unsigned(x: u128) -> Integer { match x { - 0..=0x0000_0000_0000_00ff => I8, - 0..=0x0000_0000_0000_ffff => I16, - 0..=0x0000_0000_ffff_ffff => I32, - 0..=0xffff_ffff_ffff_ffff => I64, + ..=0x0000_0000_0000_00ff => I8, + ..=0x0000_0000_0000_ffff => I16, + ..=0x0000_0000_ffff_ffff => I32, + ..=0xffff_ffff_ffff_ffff => I64, _ => I128, } } diff --git a/src/librustc_target/lib.rs b/src/librustc_target/lib.rs index a9db0254a7d11..278a2565e72b4 100644 --- a/src/librustc_target/lib.rs +++ b/src/librustc_target/lib.rs @@ -10,6 +10,7 @@ #![doc(html_root_url = "https://doc.rust-lang.org/nightly/")] #![feature(box_syntax)] #![feature(bool_to_option)] +#![feature(half_open_range_patterns)] #![feature(nll)] #[macro_use] diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index 806f868ff242e..a759f35d630a3 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -266,6 +266,7 @@ #![feature(format_args_nl)] #![feature(generator_trait)] #![feature(global_asm)] +#![feature(half_open_range_patterns)] #![feature(hash_raw_entry)] #![feature(hashmap_internals)] #![feature(int_error_internals)] diff --git a/src/libstd/sys/windows/args.rs b/src/libstd/sys/windows/args.rs index 5fbea2a291017..73b88c55083ab 100644 --- a/src/libstd/sys/windows/args.rs +++ b/src/libstd/sys/windows/args.rs @@ -83,7 +83,7 @@ unsafe fn parse_lp_cmd_line OsString>( // "However, if lpCmdLine starts with any amount of whitespace, CommandLineToArgvW // will consider the first argument to be an empty string. Excess whitespace at the // end of lpCmdLine is ignored." - 0..=SPACE => { + ..=SPACE => { ret_val.push(OsString::new()); &cmd_line[1..] } diff --git a/src/libstd/sys_common/wtf8.rs b/src/libstd/sys_common/wtf8.rs index 1d96cdfe46042..7d84cde3a0764 100644 --- a/src/libstd/sys_common/wtf8.rs +++ b/src/libstd/sys_common/wtf8.rs @@ -66,7 +66,7 @@ impl CodePoint { #[inline] pub fn from_u32(value: u32) -> Option { match value { - 0..=0x10FFFF => Some(CodePoint { value }), + ..=0x10FFFF => Some(CodePoint { value }), _ => None, } }