diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2017-07-17 09:32:08 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2017-07-25 07:03:19 -0700 |
| commit | 9010567dcc0aba772525841aee67c030ea3450c6 (patch) | |
| tree | 26b11fb6639fcde4477f8f0db8f04af1b5984a7c /src/libcore | |
| parent | 7c46c6c59dbee8d6385f8924fe27cc5a7893841f (diff) | |
| download | rust-9010567dcc0aba772525841aee67c030ea3450c6.tar.gz rust-9010567dcc0aba772525841aee67c030ea3450c6.zip | |
Bump master to 1.21.0
This commit bumps the master branch's version to 1.21.0 and also updates the bootstrap compiler from the freshly minted beta release.
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/intrinsics.rs | 2 | ||||
| -rw-r--r-- | src/libcore/lib.rs | 2 | ||||
| -rw-r--r-- | src/libcore/num/mod.rs | 21 | ||||
| -rw-r--r-- | src/libcore/panicking.rs | 25 |
4 files changed, 10 insertions, 40 deletions
diff --git a/src/libcore/intrinsics.rs b/src/libcore/intrinsics.rs index 981ab5b6c46..65c18d6d777 100644 --- a/src/libcore/intrinsics.rs +++ b/src/libcore/intrinsics.rs @@ -1229,7 +1229,6 @@ extern "rust-intrinsic" { /// let num_leading = unsafe { ctlz_nonzero(x) }; /// assert_eq!(num_leading, 3); /// ``` - #[cfg(not(stage0))] pub fn ctlz_nonzero<T>(x: T) -> T; /// Returns the number of trailing unset bits (zeroes) in an integer type `T`. @@ -1273,7 +1272,6 @@ extern "rust-intrinsic" { /// let num_trailing = unsafe { cttz_nonzero(x) }; /// assert_eq!(num_trailing, 3); /// ``` - #[cfg(not(stage0))] pub fn cttz_nonzero<T>(x: T) -> T; /// Reverses the bytes in an integer type `T`. diff --git a/src/libcore/lib.rs b/src/libcore/lib.rs index e8e31ffea0b..546d2a21939 100644 --- a/src/libcore/lib.rs +++ b/src/libcore/lib.rs @@ -93,8 +93,6 @@ #![feature(untagged_unions)] #![feature(unwind_attributes)] -#![cfg_attr(stage0, feature(associated_consts))] - #[prelude_import] #[allow(unused)] use prelude::v1::*; diff --git a/src/libcore/num/mod.rs b/src/libcore/num/mod.rs index 0ebac027c39..185034a5313 100644 --- a/src/libcore/num/mod.rs +++ b/src/libcore/num/mod.rs @@ -2238,17 +2238,12 @@ macro_rules! uint_impl { } } -#[cfg(stage0)] -unsafe fn ctlz_nonzero<T>(x: T) -> T { intrinsics::ctlz(x) } -#[cfg(not(stage0))] -unsafe fn ctlz_nonzero<T>(x: T) -> T { intrinsics::ctlz_nonzero(x) } - #[lang = "u8"] impl u8 { uint_impl! { u8, u8, 8, intrinsics::ctpop, intrinsics::ctlz, - ctlz_nonzero, + intrinsics::ctlz_nonzero, intrinsics::cttz, intrinsics::bswap, intrinsics::add_with_overflow, @@ -2261,7 +2256,7 @@ impl u16 { uint_impl! { u16, u16, 16, intrinsics::ctpop, intrinsics::ctlz, - ctlz_nonzero, + intrinsics::ctlz_nonzero, intrinsics::cttz, intrinsics::bswap, intrinsics::add_with_overflow, @@ -2274,7 +2269,7 @@ impl u32 { uint_impl! { u32, u32, 32, intrinsics::ctpop, intrinsics::ctlz, - ctlz_nonzero, + intrinsics::ctlz_nonzero, intrinsics::cttz, intrinsics::bswap, intrinsics::add_with_overflow, @@ -2287,7 +2282,7 @@ impl u64 { uint_impl! { u64, u64, 64, intrinsics::ctpop, intrinsics::ctlz, - ctlz_nonzero, + intrinsics::ctlz_nonzero, intrinsics::cttz, intrinsics::bswap, intrinsics::add_with_overflow, @@ -2300,7 +2295,7 @@ impl u128 { uint_impl! { u128, u128, 128, intrinsics::ctpop, intrinsics::ctlz, - ctlz_nonzero, + intrinsics::ctlz_nonzero, intrinsics::cttz, intrinsics::bswap, intrinsics::add_with_overflow, @@ -2314,7 +2309,7 @@ impl usize { uint_impl! { usize, u16, 16, intrinsics::ctpop, intrinsics::ctlz, - ctlz_nonzero, + intrinsics::ctlz_nonzero, intrinsics::cttz, intrinsics::bswap, intrinsics::add_with_overflow, @@ -2327,7 +2322,7 @@ impl usize { uint_impl! { usize, u32, 32, intrinsics::ctpop, intrinsics::ctlz, - ctlz_nonzero, + intrinsics::ctlz_nonzero, intrinsics::cttz, intrinsics::bswap, intrinsics::add_with_overflow, @@ -2341,7 +2336,7 @@ impl usize { uint_impl! { usize, u64, 64, intrinsics::ctpop, intrinsics::ctlz, - ctlz_nonzero, + intrinsics::ctlz_nonzero, intrinsics::cttz, intrinsics::bswap, intrinsics::add_with_overflow, diff --git a/src/libcore/panicking.rs b/src/libcore/panicking.rs index f5a7e78d0fa..4170d91e5fc 100644 --- a/src/libcore/panicking.rs +++ b/src/libcore/panicking.rs @@ -39,7 +39,7 @@ use fmt; #[cold] #[inline(never)] // this is the slow path, always -#[cfg_attr(not(stage0), lang = "panic")] +#[lang = "panic"] pub fn panic(expr_file_line_col: &(&'static str, &'static str, u32, u32)) -> ! { // Use Arguments::new_v1 instead of format_args!("{}", expr) to potentially // reduce size overhead. The format_args! macro uses str's Display trait to @@ -51,35 +51,14 @@ pub fn panic(expr_file_line_col: &(&'static str, &'static str, u32, u32)) -> ! { panic_fmt(fmt::Arguments::new_v1(&[expr], &[]), &(file, line, col)) } -// FIXME: remove when SNAP -#[cold] #[inline(never)] -#[cfg(stage0)] -#[lang = "panic"] -pub fn panic_old(expr_file_line: &(&'static str, &'static str, u32)) -> ! { - let (expr, file, line) = *expr_file_line; - let expr_file_line_col = (expr, file, line, 0); - panic(&expr_file_line_col) -} - #[cold] #[inline(never)] -#[cfg_attr(not(stage0), lang = "panic_bounds_check")] +#[lang = "panic_bounds_check"] fn panic_bounds_check(file_line_col: &(&'static str, u32, u32), index: usize, len: usize) -> ! { panic_fmt(format_args!("index out of bounds: the len is {} but the index is {}", len, index), file_line_col) } -// FIXME: remove when SNAP -#[cold] #[inline(never)] -#[cfg(stage0)] -#[lang = "panic_bounds_check"] -fn panic_bounds_check_old(file_line: &(&'static str, u32), - index: usize, len: usize) -> ! { - let (file, line) = *file_line; - panic_fmt(format_args!("index out of bounds: the len is {} but the index is {}", - len, index), &(file, line, 0)) -} - #[cold] #[inline(never)] pub fn panic_fmt(fmt: fmt::Arguments, file_line_col: &(&'static str, u32, u32)) -> ! { #[allow(improper_ctypes)] |
