Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dogfood half_open_range_patterns #68859

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/libcore/ascii.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
}
Expand Down
1 change: 1 addition & 0 deletions src/libcore/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
8 changes: 4 additions & 4 deletions src/librustc_target/abi/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
}
Expand Down
1 change: 1 addition & 0 deletions src/librustc_target/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
1 change: 1 addition & 0 deletions src/libstd/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/sys/windows/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ unsafe fn parse_lp_cmd_line<F: Fn() -> 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..]
}
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/sys_common/wtf8.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ impl CodePoint {
#[inline]
pub fn from_u32(value: u32) -> Option<CodePoint> {
match value {
0..=0x10FFFF => Some(CodePoint { value }),
..=0x10FFFF => Some(CodePoint { value }),
_ => None,
}
}
Expand Down