Skip to content

Commit d9f1249

Browse files
committed
Auto merge of #45285 - alexcrichton:update-bootstrap, r=Mark-Simulacrum
Bump to 1.23 and update bootstrap This commit updates the bootstrap compiler, bumps the version to 1.23, updates Cargo, updates books, and updates crates.io dependencies
2 parents bed9a85 + 8ceacf4 commit d9f1249

File tree

26 files changed

+287
-287
lines changed

26 files changed

+287
-287
lines changed

src/Cargo.lock

+211-175
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/bootstrap/channel.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ use Build;
2424
use config::Config;
2525

2626
// The version number
27-
pub const CFG_RELEASE_NUM: &str = "1.22.0";
27+
pub const CFG_RELEASE_NUM: &str = "1.23.0";
2828

2929
// An optional number to put after the label, e.g. '.2' -> '-beta.2'
3030
// Be sure to make this starts with a dot to conform to semver pre-release

src/doc/nomicon

src/libcore/cell.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ impl<T> Cell<T> {
329329
/// let c = Cell::new(5);
330330
/// ```
331331
#[stable(feature = "rust1", since = "1.0.0")]
332-
#[cfg_attr(not(stage0), rustc_const_unstable(feature = "const_cell_new"))]
332+
#[rustc_const_unstable(feature = "const_cell_new")]
333333
#[inline]
334334
pub const fn new(value: T) -> Cell<T> {
335335
Cell {
@@ -544,7 +544,7 @@ impl<T> RefCell<T> {
544544
/// let c = RefCell::new(5);
545545
/// ```
546546
#[stable(feature = "rust1", since = "1.0.0")]
547-
#[cfg_attr(not(stage0), rustc_const_unstable(feature = "const_refcell_new"))]
547+
#[rustc_const_unstable(feature = "const_refcell_new")]
548548
#[inline]
549549
pub const fn new(value: T) -> RefCell<T> {
550550
RefCell {
@@ -1190,7 +1190,7 @@ impl<T> UnsafeCell<T> {
11901190
/// let uc = UnsafeCell::new(5);
11911191
/// ```
11921192
#[stable(feature = "rust1", since = "1.0.0")]
1193-
#[cfg_attr(not(stage0), rustc_const_unstable(feature = "const_unsafe_cell_new"))]
1193+
#[rustc_const_unstable(feature = "const_unsafe_cell_new")]
11941194
#[inline]
11951195
pub const fn new(value: T) -> UnsafeCell<T> {
11961196
UnsafeCell { value: value }

src/libcore/intrinsics.rs

-12
Original file line numberDiff line numberDiff line change
@@ -1383,17 +1383,5 @@ extern "rust-intrinsic" {
13831383
/// }
13841384
/// # } }
13851385
/// ```
1386-
#[cfg(not(stage0))]
13871386
pub fn align_offset(ptr: *const (), align: usize) -> usize;
13881387
}
1389-
1390-
#[cfg(stage0)]
1391-
/// remove me after the next release
1392-
pub unsafe fn align_offset(ptr: *const (), align: usize) -> usize {
1393-
let offset = ptr as usize % align;
1394-
if offset == 0 {
1395-
0
1396-
} else {
1397-
align - offset
1398-
}
1399-
}

src/libcore/lib.rs

+17-18
Original file line numberDiff line numberDiff line change
@@ -85,29 +85,28 @@
8585
#![feature(prelude_import)]
8686
#![feature(repr_simd, platform_intrinsics)]
8787
#![feature(rustc_attrs)]
88-
#![cfg_attr(not(stage0), feature(rustc_const_unstable))]
88+
#![feature(rustc_const_unstable)]
8989
#![feature(specialization)]
9090
#![feature(staged_api)]
9191
#![feature(unboxed_closures)]
9292
#![feature(untagged_unions)]
9393
#![feature(unwind_attributes)]
94-
95-
#![cfg_attr(not(stage0), feature(const_min_value))]
96-
#![cfg_attr(not(stage0), feature(const_max_value))]
97-
#![cfg_attr(not(stage0), feature(const_atomic_bool_new))]
98-
#![cfg_attr(not(stage0), feature(const_atomic_isize_new))]
99-
#![cfg_attr(not(stage0), feature(const_atomic_usize_new))]
100-
#![cfg_attr(not(stage0), feature(const_atomic_i8_new))]
101-
#![cfg_attr(not(stage0), feature(const_atomic_u8_new))]
102-
#![cfg_attr(not(stage0), feature(const_atomic_i16_new))]
103-
#![cfg_attr(not(stage0), feature(const_atomic_u16_new))]
104-
#![cfg_attr(not(stage0), feature(const_atomic_i32_new))]
105-
#![cfg_attr(not(stage0), feature(const_atomic_u32_new))]
106-
#![cfg_attr(not(stage0), feature(const_atomic_i64_new))]
107-
#![cfg_attr(not(stage0), feature(const_atomic_u64_new))]
108-
#![cfg_attr(not(stage0), feature(const_unsafe_cell_new))]
109-
#![cfg_attr(not(stage0), feature(const_cell_new))]
110-
#![cfg_attr(not(stage0), feature(const_nonzero_new))]
94+
#![feature(const_min_value)]
95+
#![feature(const_max_value)]
96+
#![feature(const_atomic_bool_new)]
97+
#![feature(const_atomic_isize_new)]
98+
#![feature(const_atomic_usize_new)]
99+
#![feature(const_atomic_i8_new)]
100+
#![feature(const_atomic_u8_new)]
101+
#![feature(const_atomic_i16_new)]
102+
#![feature(const_atomic_u16_new)]
103+
#![feature(const_atomic_i32_new)]
104+
#![feature(const_atomic_u32_new)]
105+
#![feature(const_atomic_i64_new)]
106+
#![feature(const_atomic_u64_new)]
107+
#![feature(const_unsafe_cell_new)]
108+
#![feature(const_cell_new)]
109+
#![feature(const_nonzero_new)]
111110

112111
#[prelude_import]
113112
#[allow(unused)]

src/libcore/mem.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ pub fn forget<T>(t: T) {
311311
/// [alignment]: ./fn.align_of.html
312312
#[inline]
313313
#[stable(feature = "rust1", since = "1.0.0")]
314-
#[cfg_attr(not(stage0), rustc_const_unstable(feature = "const_size_of"))]
314+
#[rustc_const_unstable(feature = "const_size_of")]
315315
pub const fn size_of<T>() -> usize {
316316
unsafe { intrinsics::size_of::<T>() }
317317
}
@@ -403,7 +403,7 @@ pub fn min_align_of_val<T: ?Sized>(val: &T) -> usize {
403403
/// ```
404404
#[inline]
405405
#[stable(feature = "rust1", since = "1.0.0")]
406-
#[cfg_attr(not(stage0), rustc_const_unstable(feature = "const_align_of"))]
406+
#[rustc_const_unstable(feature = "const_align_of")]
407407
pub const fn align_of<T>() -> usize {
408408
unsafe { intrinsics::min_align_of::<T>() }
409409
}

src/libcore/nonzero.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ impl<T: Zeroable> NonZero<T> {
7171
#[unstable(feature = "nonzero",
7272
reason = "needs an RFC to flesh out the design",
7373
issue = "27730")]
74-
#[cfg_attr(not(stage0), rustc_const_unstable(feature = "const_nonzero_new"))]
74+
#[rustc_const_unstable(feature = "const_nonzero_new")]
7575
#[inline]
7676
pub const unsafe fn new_unchecked(inner: T) -> Self {
7777
NonZero(inner)

src/libcore/num/mod.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ macro_rules! int_impl {
109109
/// assert_eq!(i8::min_value(), -128);
110110
/// ```
111111
#[stable(feature = "rust1", since = "1.0.0")]
112-
#[cfg_attr(not(stage0), rustc_const_unstable(feature = "const_min_value"))]
112+
#[rustc_const_unstable(feature = "const_min_value")]
113113
#[inline]
114114
pub const fn min_value() -> Self {
115115
!0 ^ ((!0 as $UnsignedT) >> 1) as Self
@@ -123,7 +123,7 @@ macro_rules! int_impl {
123123
/// assert_eq!(i8::max_value(), 127);
124124
/// ```
125125
#[stable(feature = "rust1", since = "1.0.0")]
126-
#[cfg_attr(not(stage0), rustc_const_unstable(feature = "const_max_value"))]
126+
#[rustc_const_unstable(feature = "const_max_value")]
127127
#[inline]
128128
pub const fn max_value() -> Self {
129129
!Self::min_value()
@@ -1282,7 +1282,7 @@ macro_rules! uint_impl {
12821282
/// assert_eq!(u8::min_value(), 0);
12831283
/// ```
12841284
#[stable(feature = "rust1", since = "1.0.0")]
1285-
#[cfg_attr(not(stage0), rustc_const_unstable(feature = "const_min_value"))]
1285+
#[rustc_const_unstable(feature = "const_min_value")]
12861286
#[inline]
12871287
pub const fn min_value() -> Self { 0 }
12881288

@@ -1294,7 +1294,7 @@ macro_rules! uint_impl {
12941294
/// assert_eq!(u8::max_value(), 255);
12951295
/// ```
12961296
#[stable(feature = "rust1", since = "1.0.0")]
1297-
#[cfg_attr(not(stage0), rustc_const_unstable(feature = "const_max_value"))]
1297+
#[rustc_const_unstable(feature = "const_max_value")]
12981298
#[inline]
12991299
pub const fn max_value() -> Self { !0 }
13001300

src/libcore/ops/generator.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
/// possible return values of a generator. Currently this corresponds to either
1515
/// a suspension point (`Yielded`) or a termination point (`Complete`).
1616
#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
17-
#[cfg_attr(not(stage0), lang = "generator_state")]
17+
#[lang = "generator_state"]
1818
#[unstable(feature = "generator_trait", issue = "43122")]
1919
pub enum GeneratorState<Y, R> {
2020
/// The generator suspended with a value.
@@ -70,7 +70,7 @@ pub enum GeneratorState<Y, R> {
7070
/// More documentation of generators can be found in the unstable book.
7171
///
7272
/// [RFC 2033]: https://github.com/rust-lang/rfcs/pull/2033
73-
#[cfg_attr(not(stage0), lang = "generator")]
73+
#[lang = "generator"]
7474
#[unstable(feature = "generator_trait", issue = "43122")]
7575
#[fundamental]
7676
pub trait Generator {

src/libcore/ops/try.rs

+13-18
Original file line numberDiff line numberDiff line change
@@ -15,24 +15,19 @@
1515
/// extracting those success or failure values from an existing instance and
1616
/// creating a new instance from a success or failure value.
1717
#[unstable(feature = "try_trait", issue = "42327")]
18-
#[cfg_attr(stage0,
19-
rustc_on_unimplemented = "the `?` operator can only be used in a \
20-
function that returns `Result` \
21-
(or another type that implements `{Try}`)")]
22-
#[cfg_attr(not(stage0),
23-
rustc_on_unimplemented(
24-
on(all(
25-
any(from_method="from_error", from_method="from_ok"),
26-
from_desugaring="?"),
27-
message="the `?` operator can only be used in a \
28-
function that returns `Result` \
29-
(or another type that implements `{Try}`)",
30-
label="cannot use the `?` operator in a function that returns `{Self}`"),
31-
on(all(from_method="into_result", from_desugaring="?"),
32-
message="the `?` operator can only be applied to values \
33-
that implement `{Try}`",
34-
label="the `?` operator cannot be applied to type `{Self}`")
35-
))]
18+
#[rustc_on_unimplemented(
19+
on(all(
20+
any(from_method="from_error", from_method="from_ok"),
21+
from_desugaring="?"),
22+
message="the `?` operator can only be used in a \
23+
function that returns `Result` \
24+
(or another type that implements `{Try}`)",
25+
label="cannot use the `?` operator in a function that returns `{Self}`"),
26+
on(all(from_method="into_result", from_desugaring="?"),
27+
message="the `?` operator can only be applied to values \
28+
that implement `{Try}`",
29+
label="the `?` operator cannot be applied to type `{Self}`")
30+
)]
3631
pub trait Try {
3732
/// The type of this value when viewed as successful.
3833
#[unstable(feature = "try_trait", issue = "42327")]

src/libcore/ptr.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ pub unsafe fn drop_in_place<T: ?Sized>(to_drop: *mut T) {
7474
/// ```
7575
#[inline]
7676
#[stable(feature = "rust1", since = "1.0.0")]
77-
#[cfg_attr(not(stage0), rustc_const_unstable(feature = "const_ptr_null"))]
77+
#[rustc_const_unstable(feature = "const_ptr_null")]
7878
pub const fn null<T>() -> *const T { 0 as *const T }
7979

8080
/// Creates a null mutable raw pointer.
@@ -89,7 +89,7 @@ pub const fn null<T>() -> *const T { 0 as *const T }
8989
/// ```
9090
#[inline]
9191
#[stable(feature = "rust1", since = "1.0.0")]
92-
#[cfg_attr(not(stage0), rustc_const_unstable(feature = "const_ptr_null_mut"))]
92+
#[rustc_const_unstable(feature = "const_ptr_null_mut")]
9393
pub const fn null_mut<T>() -> *mut T { 0 as *mut T }
9494

9595
/// Swaps the values at two mutable locations of the same type, without
@@ -2333,7 +2333,7 @@ impl<T: ?Sized> Unique<T> {
23332333
///
23342334
/// `ptr` must be non-null.
23352335
#[unstable(feature = "unique", issue = "27730")]
2336-
#[cfg_attr(not(stage0), rustc_const_unstable(feature = "const_unique_new"))]
2336+
#[rustc_const_unstable(feature = "const_unique_new")]
23372337
pub const unsafe fn new_unchecked(ptr: *mut T) -> Self {
23382338
Unique { pointer: NonZero::new_unchecked(ptr), _marker: PhantomData }
23392339
}
@@ -2468,7 +2468,7 @@ impl<T: ?Sized> Shared<T> {
24682468
///
24692469
/// `ptr` must be non-null.
24702470
#[unstable(feature = "shared", issue = "27730")]
2471-
#[cfg_attr(not(stage0), rustc_const_unstable(feature = "const_shared_new"))]
2471+
#[rustc_const_unstable(feature = "const_shared_new")]
24722472
pub const unsafe fn new_unchecked(ptr: *mut T) -> Self {
24732473
Shared { pointer: NonZero::new_unchecked(ptr), _marker: PhantomData }
24742474
}

src/libcore/sync/atomic.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ impl AtomicBool {
243243
/// ```
244244
#[inline]
245245
#[stable(feature = "rust1", since = "1.0.0")]
246-
#[cfg_attr(not(stage0), rustc_const_unstable(feature = "const_atomic_bool_new"))]
246+
#[rustc_const_unstable(feature = "const_atomic_bool_new")]
247247
pub const fn new(v: bool) -> AtomicBool {
248248
AtomicBool { v: UnsafeCell::new(v as u8) }
249249
}
@@ -657,7 +657,7 @@ impl<T> AtomicPtr<T> {
657657
/// ```
658658
#[inline]
659659
#[stable(feature = "rust1", since = "1.0.0")]
660-
#[cfg_attr(not(stage0), rustc_const_unstable(feature = "const_atomic_ptr_new"))]
660+
#[rustc_const_unstable(feature = "const_atomic_ptr_new")]
661661
pub const fn new(p: *mut T) -> AtomicPtr<T> {
662662
AtomicPtr { p: UnsafeCell::new(p) }
663663
}
@@ -992,7 +992,7 @@ macro_rules! atomic_int {
992992
/// ```
993993
#[inline]
994994
#[$stable]
995-
#[cfg_attr(not(stage0), $const_unstable)]
995+
#[$const_unstable]
996996
pub const fn new(v: $int_type) -> Self {
997997
$atomic_type {v: UnsafeCell::new(v)}
998998
}

src/librustc/lib.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,7 @@
5656
#![feature(unboxed_closures)]
5757
#![feature(trace_macros)]
5858
#![feature(test)]
59-
60-
#![cfg_attr(stage0, feature(const_fn))]
61-
#![cfg_attr(not(stage0), feature(const_atomic_bool_new))]
59+
#![feature(const_atomic_bool_new)]
6260

6361
#![recursion_limit="512"]
6462

src/librustc_apfloat/lib.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,12 @@
4545
#![deny(warnings)]
4646
#![forbid(unsafe_code)]
4747

48+
#![feature(const_max_value)]
49+
#![feature(const_min_value)]
4850
#![feature(i128_type)]
4951
#![feature(slice_patterns)]
5052
#![feature(try_from)]
5153

52-
#![cfg_attr(stage0, feature(const_fn))]
53-
#![cfg_attr(not(stage0), feature(const_min_value))]
54-
#![cfg_attr(not(stage0), feature(const_max_value))]
55-
5654
// See librustc_cratesio_shim/Cargo.toml for a comment explaining this.
5755
#[allow(unused_extern_crates)]
5856
extern crate rustc_cratesio_shim;

src/librustc_const_eval/lib.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@
2525
#![feature(box_syntax)]
2626
#![feature(i128_type)]
2727

28-
#![cfg_attr(stage0, feature(const_fn))]
29-
#![cfg_attr(not(stage0), feature(const_min_value))]
28+
#![feature(const_min_value)]
3029

3130
extern crate arena;
3231
#[macro_use] extern crate syntax;

src/librustc_const_math/lib.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,8 @@
2222
#![feature(i128)]
2323
#![feature(i128_type)]
2424

25-
#![cfg_attr(stage0, feature(const_fn))]
26-
#![cfg_attr(not(stage0), feature(const_min_value))]
27-
#![cfg_attr(not(stage0), feature(const_max_value))]
25+
#![feature(const_min_value)]
26+
#![feature(const_max_value)]
2827

2928
extern crate rustc_apfloat;
3029

src/librustc_trans/lib.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,8 @@
3030
#![feature(slice_patterns)]
3131
#![feature(conservative_impl_trait)]
3232

33-
#![cfg_attr(stage0, feature(const_fn))]
34-
#![cfg_attr(not(stage0), feature(const_atomic_bool_new))]
35-
#![cfg_attr(not(stage0), feature(const_once_new))]
33+
#![feature(const_atomic_bool_new)]
34+
#![feature(const_once_new)]
3635

3736
use rustc::dep_graph::WorkProduct;
3837
use syntax_pos::symbol::Symbol;

src/librustc_trans_utils/lib.rs

-2
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@
2727
#![feature(slice_patterns)]
2828
#![feature(conservative_impl_trait)]
2929

30-
#![cfg_attr(stage0, feature(const_fn))]
31-
3230
extern crate ar;
3331
extern crate flate2;
3432
extern crate owning_ref;

0 commit comments

Comments
 (0)