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

Switch bootstrap to 1.41 #67402

Merged
merged 3 commits into from
Dec 19, 2019
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
2 changes: 1 addition & 1 deletion src/bootstrap/channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use build_helper::output;
use crate::Build;

// The version number
pub const CFG_RELEASE_NUM: &str = "1.41.0";
pub const CFG_RELEASE_NUM: &str = "1.42.0";

pub struct GitInfo {
inner: Option<Info>,
Expand Down
5 changes: 1 addition & 4 deletions src/liballoc/collections/linked_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -275,10 +275,7 @@ impl<T> LinkedList<T> {
/// let list: LinkedList<u32> = LinkedList::new();
/// ```
#[inline]
#[cfg_attr(
not(bootstrap),
rustc_const_stable(feature = "const_linked_list_new", since = "1.32.0"),
)]
#[rustc_const_stable(feature = "const_linked_list_new", since = "1.32.0")]
#[stable(feature = "rust1", since = "1.0.0")]
pub const fn new() -> Self {
LinkedList {
Expand Down
2 changes: 0 additions & 2 deletions src/liballoc/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,6 @@
#![feature(unsize)]
#![feature(unsized_locals)]
#![feature(allocator_internals)]
#![cfg_attr(bootstrap, feature(on_unimplemented))]
#![cfg_attr(bootstrap, feature(rustc_const_unstable))]
#![feature(slice_partition_dedup)]
#![feature(maybe_uninit_extra, maybe_uninit_slice)]
#![feature(alloc_layout_extra)]
Expand Down
5 changes: 1 addition & 4 deletions src/liballoc/string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -367,10 +367,7 @@ impl String {
/// let s = String::new();
/// ```
#[inline]
#[cfg_attr(
not(bootstrap),
rustc_const_stable(feature = "const_string_new", since = "1.32.0"),
)]
#[rustc_const_stable(feature = "const_string_new", since = "1.32.0")]
#[stable(feature = "rust1", since = "1.0.0")]
pub const fn new() -> String {
String { vec: Vec::new() }
Expand Down
5 changes: 1 addition & 4 deletions src/liballoc/vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -315,10 +315,7 @@ impl<T> Vec<T> {
/// let mut vec: Vec<i32> = Vec::new();
/// ```
#[inline]
#[cfg_attr(
not(bootstrap),
rustc_const_stable(feature = "const_vec_new", since = "1.32.0"),
)]
#[rustc_const_stable(feature = "const_vec_new", since = "1.32.0")]
#[stable(feature = "rust1", since = "1.0.0")]
pub const fn new() -> Vec<T> {
Vec {
Expand Down
2 changes: 1 addition & 1 deletion src/libcore/alloc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ impl Layout {
/// This function is unsafe as it does not verify the preconditions from
/// [`Layout::from_size_align`](#method.from_size_align).
#[stable(feature = "alloc_layout", since = "1.28.0")]
#[cfg_attr(not(bootstrap), rustc_const_stable(feature = "alloc_layout", since = "1.28.0"))]
#[rustc_const_stable(feature = "alloc_layout", since = "1.28.0")]
#[inline]
pub const unsafe fn from_size_align_unchecked(size: usize, align: usize) -> Self {
Layout { size_: size, align_: NonZeroUsize::new_unchecked(align) }
Expand Down
13 changes: 3 additions & 10 deletions src/libcore/any.rs
Original file line number Diff line number Diff line change
Expand Up @@ -423,14 +423,9 @@ impl TypeId {
/// assert_eq!(is_string(&"cookie monster".to_string()), true);
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[cfg_attr(bootstrap, rustc_const_unstable(feature="const_type_id"))]
#[cfg_attr(not(bootstrap), rustc_const_unstable(feature="const_type_id", issue = "41875"))]
#[rustc_const_unstable(feature="const_type_id", issue = "41875")]
pub const fn of<T: ?Sized + 'static>() -> TypeId {
TypeId {
#[cfg(bootstrap)]
// SAFETY: going away soon
t: unsafe { intrinsics::type_id::<T>() },
#[cfg(not(bootstrap))]
t: intrinsics::type_id::<T>(),
}
}
Expand Down Expand Up @@ -462,8 +457,7 @@ impl TypeId {
/// );
/// ```
#[stable(feature = "type_name", since = "1.38.0")]
#[cfg_attr(bootstrap, rustc_const_unstable(feature = "const_type_name"))]
#[cfg_attr(not(bootstrap), rustc_const_unstable(feature = "const_type_name", issue = "63084"))]
#[rustc_const_unstable(feature = "const_type_name", issue = "63084")]
pub const fn type_name<T: ?Sized>() -> &'static str {
intrinsics::type_name::<T>()
}
Expand Down Expand Up @@ -501,8 +495,7 @@ pub const fn type_name<T: ?Sized>() -> &'static str {
/// println!("{}", type_name_of_val(&y));
/// ```
#[unstable(feature = "type_name_of_val", issue = "66359")]
#[cfg_attr(bootstrap, rustc_const_unstable(feature = "const_type_name"))]
#[cfg_attr(not(bootstrap), rustc_const_unstable(feature = "const_type_name", issue = "63084"))]
#[rustc_const_unstable(feature = "const_type_name", issue = "63084")]
pub const fn type_name_of_val<T: ?Sized>(val: &T) -> &'static str {
let _ = val;
type_name::<T>()
Expand Down
16 changes: 5 additions & 11 deletions src/libcore/cell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ impl<T> Cell<T> {
/// let c = Cell::new(5);
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[cfg_attr(not(bootstrap), rustc_const_stable(feature = "const_cell_new", since = "1.32.0"))]
#[rustc_const_stable(feature = "const_cell_new", since = "1.32.0")]
#[inline]
pub const fn new(value: T) -> Cell<T> {
Cell {
Expand Down Expand Up @@ -470,7 +470,7 @@ impl<T: ?Sized> Cell<T> {
/// ```
#[inline]
#[stable(feature = "cell_as_ptr", since = "1.12.0")]
#[cfg_attr(not(bootstrap), rustc_const_stable(feature = "const_cell_as_ptr", since = "1.32.0"))]
#[rustc_const_stable(feature = "const_cell_as_ptr", since = "1.32.0")]
pub const fn as_ptr(&self) -> *mut T {
self.value.get()
}
Expand Down Expand Up @@ -651,7 +651,7 @@ impl<T> RefCell<T> {
/// let c = RefCell::new(5);
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[cfg_attr(not(bootstrap), rustc_const_stable(feature = "const_refcell_new", since = "1.32.0"))]
#[rustc_const_stable(feature = "const_refcell_new", since = "1.32.0")]
#[inline]
pub const fn new(value: T) -> RefCell<T> {
RefCell {
Expand Down Expand Up @@ -1504,10 +1504,7 @@ impl<T> UnsafeCell<T> {
/// let uc = UnsafeCell::new(5);
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[cfg_attr(
not(bootstrap),
rustc_const_stable(feature = "const_unsafe_cell_new", since = "1.32.0"),
)]
#[rustc_const_stable(feature = "const_unsafe_cell_new", since = "1.32.0")]
#[inline]
pub const fn new(value: T) -> UnsafeCell<T> {
UnsafeCell { value }
Expand Down Expand Up @@ -1550,10 +1547,7 @@ impl<T: ?Sized> UnsafeCell<T> {
/// ```
#[inline]
#[stable(feature = "rust1", since = "1.0.0")]
#[cfg_attr(
not(bootstrap),
rustc_const_stable(feature = "const_unsafecell_get", since = "1.32.0"),
)]
#[rustc_const_stable(feature = "const_unsafecell_get", since = "1.32.0")]
pub const fn get(&self) -> *mut T {
// We can just cast the pointer from `UnsafeCell<T>` to `T` because of
// #[repr(transparent)]. This exploits libstd's special status, there is
Expand Down
5 changes: 1 addition & 4 deletions src/libcore/char/methods.rs
Original file line number Diff line number Diff line change
Expand Up @@ -911,10 +911,7 @@ impl char {
/// assert!(!non_ascii.is_ascii());
/// ```
#[stable(feature = "ascii_methods_on_intrinsics", since = "1.23.0")]
#[cfg_attr(
not(bootstrap),
rustc_const_stable(feature = "const_ascii_methods_on_intrinsics", since = "1.32.0"),
)]
#[rustc_const_stable(feature = "const_ascii_methods_on_intrinsics", since = "1.32.0")]
#[inline]
pub const fn is_ascii(&self) -> bool {
*self as u32 <= 0x7F
Expand Down
2 changes: 1 addition & 1 deletion src/libcore/convert/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ pub use num::FloatToInt;
/// assert_eq!(vec![1, 3], filtered);
/// ```
#[stable(feature = "convert_id", since = "1.33.0")]
#[cfg_attr(not(bootstrap), rustc_const_stable(feature = "const_identity", since = "1.33.0"))]
#[rustc_const_stable(feature = "const_identity", since = "1.33.0")]
#[inline]
pub const fn identity<T>(x: T) -> T {
x
Expand Down
2 changes: 0 additions & 2 deletions src/libcore/convert/num.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ mod private {
/// Typically doesn’t need to be used directly.
#[unstable(feature = "convert_float_to_int", issue = "67057")]
pub trait FloatToInt<Int>: private::Sealed + Sized {
#[cfg(not(bootstrap))]
#[unstable(feature = "float_approx_unchecked_to", issue = "67058")]
#[doc(hidden)]
unsafe fn approx_unchecked(self) -> Int;
Expand All @@ -26,7 +25,6 @@ macro_rules! impl_float_to_int {
$(
#[unstable(feature = "convert_float_to_int", issue = "67057")]
impl FloatToInt<$Int> for $Float {
#[cfg(not(bootstrap))]
#[doc(hidden)]
#[inline]
unsafe fn approx_unchecked(self) -> $Int {
Expand Down
8 changes: 1 addition & 7 deletions src/libcore/intrinsics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -939,11 +939,7 @@ extern "rust-intrinsic" {
/// }
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[cfg_attr(bootstrap, rustc_const_unstable(feature = "const_transmute"))]
#[cfg_attr(
not(bootstrap),
rustc_const_unstable(feature = "const_transmute", issue = "53605"),
)]
#[rustc_const_unstable(feature = "const_transmute", issue = "53605")]
pub fn transmute<T, U>(e: T) -> U;

/// Returns `true` if the actual type given as `T` requires drop
Expand Down Expand Up @@ -1150,7 +1146,6 @@ extern "rust-intrinsic" {

/// Convert with LLVM’s fptoui/fptosi, which may return undef for values out of range
/// https://github.com/rust-lang/rust/issues/10184
#[cfg(not(bootstrap))]
pub fn float_to_int_approx_unchecked<Float, Int>(value: Float) -> Int;


Expand Down Expand Up @@ -1361,7 +1356,6 @@ extern "rust-intrinsic" {
/// Compiles to a NOP during non-Miri codegen.
///
/// Perma-unstable: do not use
#[cfg(not(bootstrap))]
pub fn miri_start_panic(data: *mut (dyn crate::any::Any + crate::marker::Send)) -> ();
}

Expand Down
8 changes: 0 additions & 8 deletions src/libcore/iter/adapters/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -517,14 +517,6 @@ impl<I> Iterator for StepBy<I> where I: Iterator {
// overflow handling
loop {
let mul = n.checked_mul(step);
#[cfg(bootstrap)]
{
// SAFETY: going away soon
if unsafe { intrinsics::likely(mul.is_some()) } {
return self.iter.nth(mul.unwrap() - 1);
}
}
#[cfg(not(bootstrap))]
{
if intrinsics::likely(mul.is_some()) {
return self.iter.nth(mul.unwrap() - 1);
Expand Down
2 changes: 1 addition & 1 deletion src/libcore/iter/sources.rs
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ impl<T> Default for Empty<T> {
/// assert_eq!(None, nope.next());
/// ```
#[stable(feature = "iter_empty", since = "1.2.0")]
#[cfg_attr(not(bootstrap), rustc_const_stable(feature = "const_iter_empty", since = "1.32.0"))]
#[rustc_const_stable(feature = "const_iter_empty", since = "1.32.0")]
pub const fn empty<T>() -> Empty<T> {
Empty(marker::PhantomData)
}
Expand Down
8 changes: 3 additions & 5 deletions src/libcore/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@
#![feature(const_fn)]
#![feature(const_fn_union)]
#![feature(const_generics)]
#![cfg_attr(not(bootstrap), feature(const_ptr_offset_from))]
#![cfg_attr(not(bootstrap), feature(const_type_name))]
#![feature(const_ptr_offset_from)]
#![feature(const_type_name)]
#![feature(custom_inner_attributes)]
#![feature(decl_macro)]
#![feature(doc_cfg)]
Expand All @@ -91,18 +91,16 @@
#![feature(nll)]
#![feature(exhaustive_patterns)]
#![feature(no_core)]
#![cfg_attr(bootstrap, feature(on_unimplemented))]
#![feature(optin_builtin_traits)]
#![feature(prelude_import)]
#![feature(repr_simd, platform_intrinsics)]
#![feature(rustc_attrs)]
#![cfg_attr(bootstrap, feature(rustc_const_unstable))]
#![feature(simd_ffi)]
#![feature(specialization)]
#![feature(staged_api)]
#![feature(std_internals)]
#![feature(stmt_expr_attributes)]
#![cfg_attr(not(bootstrap), feature(track_caller))]
#![feature(track_caller)]
#![feature(transparent_unions)]
#![feature(unboxed_closures)]
#![feature(unsized_locals)]
Expand Down
10 changes: 2 additions & 8 deletions src/libcore/mem/manually_drop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,7 @@ impl<T> ManuallyDrop<T> {
/// ManuallyDrop::new(Box::new(()));
/// ```
#[stable(feature = "manually_drop", since = "1.20.0")]
#[cfg_attr(
not(bootstrap),
rustc_const_stable(feature = "const_manually_drop", since = "1.36.0"),
)]
#[rustc_const_stable(feature = "const_manually_drop", since = "1.36.0")]
#[inline(always)]
pub const fn new(value: T) -> ManuallyDrop<T> {
ManuallyDrop { value }
Expand All @@ -84,10 +81,7 @@ impl<T> ManuallyDrop<T> {
/// let _: Box<()> = ManuallyDrop::into_inner(x); // This drops the `Box`.
/// ```
#[stable(feature = "manually_drop", since = "1.20.0")]
#[cfg_attr(
not(bootstrap),
rustc_const_stable(feature = "const_manually_drop", since = "1.36.0"),
)]
#[rustc_const_stable(feature = "const_manually_drop", since = "1.36.0")]
#[inline(always)]
pub const fn into_inner(slot: ManuallyDrop<T>) -> T {
slot.value
Expand Down
16 changes: 5 additions & 11 deletions src/libcore/mem/maybe_uninit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -250,10 +250,7 @@ impl<T> MaybeUninit<T> {
///
/// [`assume_init`]: #method.assume_init
#[stable(feature = "maybe_uninit", since = "1.36.0")]
#[cfg_attr(
not(bootstrap),
rustc_const_stable(feature = "const_maybe_uninit", since = "1.36.0"),
)]
#[rustc_const_stable(feature = "const_maybe_uninit", since = "1.36.0")]
#[inline(always)]
pub const fn new(val: T) -> MaybeUninit<T> {
MaybeUninit { value: ManuallyDrop::new(val) }
Expand All @@ -268,12 +265,9 @@ impl<T> MaybeUninit<T> {
///
/// [type]: union.MaybeUninit.html
#[stable(feature = "maybe_uninit", since = "1.36.0")]
#[cfg_attr(
not(bootstrap),
rustc_const_stable(feature = "const_maybe_uninit", since = "1.36.0"),
)]
#[rustc_const_stable(feature = "const_maybe_uninit", since = "1.36.0")]
#[inline(always)]
#[cfg_attr(all(not(bootstrap)), rustc_diagnostic_item = "maybe_uninit_uninit")]
#[rustc_diagnostic_item = "maybe_uninit_uninit"]
pub const fn uninit() -> MaybeUninit<T> {
MaybeUninit { uninit: () }
}
Expand Down Expand Up @@ -357,7 +351,7 @@ impl<T> MaybeUninit<T> {
/// ```
#[stable(feature = "maybe_uninit", since = "1.36.0")]
#[inline]
#[cfg_attr(all(not(bootstrap)), rustc_diagnostic_item = "maybe_uninit_zeroed")]
#[rustc_diagnostic_item = "maybe_uninit_zeroed"]
pub fn zeroed() -> MaybeUninit<T> {
let mut u = MaybeUninit::<T>::uninit();
unsafe {
Expand Down Expand Up @@ -498,7 +492,7 @@ impl<T> MaybeUninit<T> {
/// ```
#[stable(feature = "maybe_uninit", since = "1.36.0")]
#[inline(always)]
#[cfg_attr(all(not(bootstrap)), rustc_diagnostic_item = "assume_init")]
#[rustc_diagnostic_item = "assume_init"]
pub unsafe fn assume_init(self) -> T {
intrinsics::panic_if_uninhabited::<T>();
ManuallyDrop::into_inner(self.value)
Expand Down
Loading