Skip to content

Bump to 1.23 and update bootstrap #45285

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

Merged
merged 2 commits into from
Oct 27, 2017
Merged
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
386 changes: 211 additions & 175 deletions src/Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/bootstrap/channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ use Build;
use config::Config;

// The version number
pub const CFG_RELEASE_NUM: &str = "1.22.0";
pub const CFG_RELEASE_NUM: &str = "1.23.0";

// An optional number to put after the label, e.g. '.2' -> '-beta.2'
// Be sure to make this starts with a dot to conform to semver pre-release
Expand Down
2 changes: 1 addition & 1 deletion src/doc/nomicon
6 changes: 3 additions & 3 deletions src/libcore/cell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ impl<T> Cell<T> {
/// let c = Cell::new(5);
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[cfg_attr(not(stage0), rustc_const_unstable(feature = "const_cell_new"))]
#[rustc_const_unstable(feature = "const_cell_new")]
#[inline]
pub const fn new(value: T) -> Cell<T> {
Cell {
Expand Down Expand Up @@ -544,7 +544,7 @@ impl<T> RefCell<T> {
/// let c = RefCell::new(5);
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[cfg_attr(not(stage0), rustc_const_unstable(feature = "const_refcell_new"))]
#[rustc_const_unstable(feature = "const_refcell_new")]
#[inline]
pub const fn new(value: T) -> RefCell<T> {
RefCell {
Expand Down Expand Up @@ -1190,7 +1190,7 @@ impl<T> UnsafeCell<T> {
/// let uc = UnsafeCell::new(5);
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[cfg_attr(not(stage0), rustc_const_unstable(feature = "const_unsafe_cell_new"))]
#[rustc_const_unstable(feature = "const_unsafe_cell_new")]
#[inline]
pub const fn new(value: T) -> UnsafeCell<T> {
UnsafeCell { value: value }
Expand Down
12 changes: 0 additions & 12 deletions src/libcore/intrinsics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1383,17 +1383,5 @@ extern "rust-intrinsic" {
/// }
/// # } }
/// ```
#[cfg(not(stage0))]
pub fn align_offset(ptr: *const (), align: usize) -> usize;
}

#[cfg(stage0)]
/// remove me after the next release
pub unsafe fn align_offset(ptr: *const (), align: usize) -> usize {
let offset = ptr as usize % align;
if offset == 0 {
0
} else {
align - offset
}
}
35 changes: 17 additions & 18 deletions src/libcore/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,29 +85,28 @@
#![feature(prelude_import)]
#![feature(repr_simd, platform_intrinsics)]
#![feature(rustc_attrs)]
#![cfg_attr(not(stage0), feature(rustc_const_unstable))]
#![feature(rustc_const_unstable)]
#![feature(specialization)]
#![feature(staged_api)]
#![feature(unboxed_closures)]
#![feature(untagged_unions)]
#![feature(unwind_attributes)]

#![cfg_attr(not(stage0), feature(const_min_value))]
#![cfg_attr(not(stage0), feature(const_max_value))]
#![cfg_attr(not(stage0), feature(const_atomic_bool_new))]
#![cfg_attr(not(stage0), feature(const_atomic_isize_new))]
#![cfg_attr(not(stage0), feature(const_atomic_usize_new))]
#![cfg_attr(not(stage0), feature(const_atomic_i8_new))]
#![cfg_attr(not(stage0), feature(const_atomic_u8_new))]
#![cfg_attr(not(stage0), feature(const_atomic_i16_new))]
#![cfg_attr(not(stage0), feature(const_atomic_u16_new))]
#![cfg_attr(not(stage0), feature(const_atomic_i32_new))]
#![cfg_attr(not(stage0), feature(const_atomic_u32_new))]
#![cfg_attr(not(stage0), feature(const_atomic_i64_new))]
#![cfg_attr(not(stage0), feature(const_atomic_u64_new))]
#![cfg_attr(not(stage0), feature(const_unsafe_cell_new))]
#![cfg_attr(not(stage0), feature(const_cell_new))]
#![cfg_attr(not(stage0), feature(const_nonzero_new))]
#![feature(const_min_value)]
#![feature(const_max_value)]
#![feature(const_atomic_bool_new)]
#![feature(const_atomic_isize_new)]
#![feature(const_atomic_usize_new)]
#![feature(const_atomic_i8_new)]
#![feature(const_atomic_u8_new)]
#![feature(const_atomic_i16_new)]
#![feature(const_atomic_u16_new)]
#![feature(const_atomic_i32_new)]
#![feature(const_atomic_u32_new)]
#![feature(const_atomic_i64_new)]
#![feature(const_atomic_u64_new)]
#![feature(const_unsafe_cell_new)]
#![feature(const_cell_new)]
#![feature(const_nonzero_new)]

#[prelude_import]
#[allow(unused)]
Expand Down
4 changes: 2 additions & 2 deletions src/libcore/mem.rs
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ pub fn forget<T>(t: T) {
/// [alignment]: ./fn.align_of.html
#[inline]
#[stable(feature = "rust1", since = "1.0.0")]
#[cfg_attr(not(stage0), rustc_const_unstable(feature = "const_size_of"))]
#[rustc_const_unstable(feature = "const_size_of")]
pub const fn size_of<T>() -> usize {
unsafe { intrinsics::size_of::<T>() }
}
Expand Down Expand Up @@ -403,7 +403,7 @@ pub fn min_align_of_val<T: ?Sized>(val: &T) -> usize {
/// ```
#[inline]
#[stable(feature = "rust1", since = "1.0.0")]
#[cfg_attr(not(stage0), rustc_const_unstable(feature = "const_align_of"))]
#[rustc_const_unstable(feature = "const_align_of")]
pub const fn align_of<T>() -> usize {
unsafe { intrinsics::min_align_of::<T>() }
}
Expand Down
2 changes: 1 addition & 1 deletion src/libcore/nonzero.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ impl<T: Zeroable> NonZero<T> {
#[unstable(feature = "nonzero",
reason = "needs an RFC to flesh out the design",
issue = "27730")]
#[cfg_attr(not(stage0), rustc_const_unstable(feature = "const_nonzero_new"))]
#[rustc_const_unstable(feature = "const_nonzero_new")]
#[inline]
pub const unsafe fn new_unchecked(inner: T) -> Self {
NonZero(inner)
Expand Down
8 changes: 4 additions & 4 deletions src/libcore/num/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ macro_rules! int_impl {
/// assert_eq!(i8::min_value(), -128);
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[cfg_attr(not(stage0), rustc_const_unstable(feature = "const_min_value"))]
#[rustc_const_unstable(feature = "const_min_value")]
#[inline]
pub const fn min_value() -> Self {
!0 ^ ((!0 as $UnsignedT) >> 1) as Self
Expand All @@ -123,7 +123,7 @@ macro_rules! int_impl {
/// assert_eq!(i8::max_value(), 127);
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[cfg_attr(not(stage0), rustc_const_unstable(feature = "const_max_value"))]
#[rustc_const_unstable(feature = "const_max_value")]
#[inline]
pub const fn max_value() -> Self {
!Self::min_value()
Expand Down Expand Up @@ -1282,7 +1282,7 @@ macro_rules! uint_impl {
/// assert_eq!(u8::min_value(), 0);
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[cfg_attr(not(stage0), rustc_const_unstable(feature = "const_min_value"))]
#[rustc_const_unstable(feature = "const_min_value")]
#[inline]
pub const fn min_value() -> Self { 0 }

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

Expand Down
4 changes: 2 additions & 2 deletions src/libcore/ops/generator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
/// possible return values of a generator. Currently this corresponds to either
/// a suspension point (`Yielded`) or a termination point (`Complete`).
#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
#[cfg_attr(not(stage0), lang = "generator_state")]
#[lang = "generator_state"]
#[unstable(feature = "generator_trait", issue = "43122")]
pub enum GeneratorState<Y, R> {
/// The generator suspended with a value.
Expand Down Expand Up @@ -70,7 +70,7 @@ pub enum GeneratorState<Y, R> {
/// More documentation of generators can be found in the unstable book.
///
/// [RFC 2033]: https://github.com/rust-lang/rfcs/pull/2033
#[cfg_attr(not(stage0), lang = "generator")]
#[lang = "generator"]
#[unstable(feature = "generator_trait", issue = "43122")]
#[fundamental]
pub trait Generator {
Expand Down
31 changes: 13 additions & 18 deletions src/libcore/ops/try.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,19 @@
/// extracting those success or failure values from an existing instance and
/// creating a new instance from a success or failure value.
#[unstable(feature = "try_trait", issue = "42327")]
#[cfg_attr(stage0,
rustc_on_unimplemented = "the `?` operator can only be used in a \
function that returns `Result` \
(or another type that implements `{Try}`)")]
#[cfg_attr(not(stage0),
rustc_on_unimplemented(
on(all(
any(from_method="from_error", from_method="from_ok"),
from_desugaring="?"),
message="the `?` operator can only be used in a \
function that returns `Result` \
(or another type that implements `{Try}`)",
label="cannot use the `?` operator in a function that returns `{Self}`"),
on(all(from_method="into_result", from_desugaring="?"),
message="the `?` operator can only be applied to values \
that implement `{Try}`",
label="the `?` operator cannot be applied to type `{Self}`")
))]
#[rustc_on_unimplemented(
on(all(
any(from_method="from_error", from_method="from_ok"),
from_desugaring="?"),
message="the `?` operator can only be used in a \
function that returns `Result` \
(or another type that implements `{Try}`)",
label="cannot use the `?` operator in a function that returns `{Self}`"),
on(all(from_method="into_result", from_desugaring="?"),
message="the `?` operator can only be applied to values \
that implement `{Try}`",
label="the `?` operator cannot be applied to type `{Self}`")
)]
pub trait Try {
/// The type of this value when viewed as successful.
#[unstable(feature = "try_trait", issue = "42327")]
Expand Down
8 changes: 4 additions & 4 deletions src/libcore/ptr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ pub unsafe fn drop_in_place<T: ?Sized>(to_drop: *mut T) {
/// ```
#[inline]
#[stable(feature = "rust1", since = "1.0.0")]
#[cfg_attr(not(stage0), rustc_const_unstable(feature = "const_ptr_null"))]
#[rustc_const_unstable(feature = "const_ptr_null")]
pub const fn null<T>() -> *const T { 0 as *const T }

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

/// Swaps the values at two mutable locations of the same type, without
Expand Down Expand Up @@ -2333,7 +2333,7 @@ impl<T: ?Sized> Unique<T> {
///
/// `ptr` must be non-null.
#[unstable(feature = "unique", issue = "27730")]
#[cfg_attr(not(stage0), rustc_const_unstable(feature = "const_unique_new"))]
#[rustc_const_unstable(feature = "const_unique_new")]
pub const unsafe fn new_unchecked(ptr: *mut T) -> Self {
Unique { pointer: NonZero::new_unchecked(ptr), _marker: PhantomData }
}
Expand Down Expand Up @@ -2468,7 +2468,7 @@ impl<T: ?Sized> Shared<T> {
///
/// `ptr` must be non-null.
#[unstable(feature = "shared", issue = "27730")]
#[cfg_attr(not(stage0), rustc_const_unstable(feature = "const_shared_new"))]
#[rustc_const_unstable(feature = "const_shared_new")]
pub const unsafe fn new_unchecked(ptr: *mut T) -> Self {
Shared { pointer: NonZero::new_unchecked(ptr), _marker: PhantomData }
}
Expand Down
6 changes: 3 additions & 3 deletions src/libcore/sync/atomic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ impl AtomicBool {
/// ```
#[inline]
#[stable(feature = "rust1", since = "1.0.0")]
#[cfg_attr(not(stage0), rustc_const_unstable(feature = "const_atomic_bool_new"))]
#[rustc_const_unstable(feature = "const_atomic_bool_new")]
pub const fn new(v: bool) -> AtomicBool {
AtomicBool { v: UnsafeCell::new(v as u8) }
}
Expand Down Expand Up @@ -657,7 +657,7 @@ impl<T> AtomicPtr<T> {
/// ```
#[inline]
#[stable(feature = "rust1", since = "1.0.0")]
#[cfg_attr(not(stage0), rustc_const_unstable(feature = "const_atomic_ptr_new"))]
#[rustc_const_unstable(feature = "const_atomic_ptr_new")]
pub const fn new(p: *mut T) -> AtomicPtr<T> {
AtomicPtr { p: UnsafeCell::new(p) }
}
Expand Down Expand Up @@ -992,7 +992,7 @@ macro_rules! atomic_int {
/// ```
#[inline]
#[$stable]
#[cfg_attr(not(stage0), $const_unstable)]
#[$const_unstable]
pub const fn new(v: $int_type) -> Self {
$atomic_type {v: UnsafeCell::new(v)}
}
Expand Down
4 changes: 1 addition & 3 deletions src/librustc/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,7 @@
#![feature(unboxed_closures)]
#![feature(trace_macros)]
#![feature(test)]

#![cfg_attr(stage0, feature(const_fn))]
#![cfg_attr(not(stage0), feature(const_atomic_bool_new))]
#![feature(const_atomic_bool_new)]

#![recursion_limit="512"]

Expand Down
6 changes: 2 additions & 4 deletions src/librustc_apfloat/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,12 @@
#![deny(warnings)]
#![forbid(unsafe_code)]

#![feature(const_max_value)]
#![feature(const_min_value)]
#![feature(i128_type)]
#![feature(slice_patterns)]
#![feature(try_from)]

#![cfg_attr(stage0, feature(const_fn))]
#![cfg_attr(not(stage0), feature(const_min_value))]
#![cfg_attr(not(stage0), feature(const_max_value))]

// See librustc_cratesio_shim/Cargo.toml for a comment explaining this.
#[allow(unused_extern_crates)]
extern crate rustc_cratesio_shim;
Expand Down
3 changes: 1 addition & 2 deletions src/librustc_const_eval/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@
#![feature(box_syntax)]
#![feature(i128_type)]

#![cfg_attr(stage0, feature(const_fn))]
#![cfg_attr(not(stage0), feature(const_min_value))]
#![feature(const_min_value)]

extern crate arena;
#[macro_use] extern crate syntax;
Expand Down
5 changes: 2 additions & 3 deletions src/librustc_const_math/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,8 @@
#![feature(i128)]
#![feature(i128_type)]

#![cfg_attr(stage0, feature(const_fn))]
#![cfg_attr(not(stage0), feature(const_min_value))]
#![cfg_attr(not(stage0), feature(const_max_value))]
#![feature(const_min_value)]
#![feature(const_max_value)]

extern crate rustc_apfloat;

Expand Down
5 changes: 2 additions & 3 deletions src/librustc_trans/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,8 @@
#![feature(slice_patterns)]
#![feature(conservative_impl_trait)]

#![cfg_attr(stage0, feature(const_fn))]
#![cfg_attr(not(stage0), feature(const_atomic_bool_new))]
#![cfg_attr(not(stage0), feature(const_once_new))]
#![feature(const_atomic_bool_new)]
#![feature(const_once_new)]

use rustc::dep_graph::WorkProduct;
use syntax_pos::symbol::Symbol;
Expand Down
2 changes: 0 additions & 2 deletions src/librustc_trans_utils/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
#![feature(slice_patterns)]
#![feature(conservative_impl_trait)]

#![cfg_attr(stage0, feature(const_fn))]

extern crate ar;
extern crate flate2;
extern crate owning_ref;
Expand Down
Loading