diff options
| author | bors <bors@rust-lang.org> | 2019-08-14 20:49:07 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-08-14 20:49:07 +0000 |
| commit | 082cf2f9d136166cd1d552d3fb5abb1c46c99a14 (patch) | |
| tree | 6ef4da1d58e6bd5dde9b627629ab4e837d079469 /src/libcore | |
| parent | c43d03a19f326f4a323569328cc501e86eb6d22e (diff) | |
| parent | f7ff36dcb27b48329e9b1c12f5b78d469fafc067 (diff) | |
| download | rust-082cf2f9d136166cd1d552d3fb5abb1c46c99a14.tar.gz rust-082cf2f9d136166cd1d552d3fb5abb1c46c99a14.zip | |
Auto merge of #63534 - Mark-Simulacrum:stage0-bump, r=Centril
Bump to 1.39 r? @Centril
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/any.rs | 5 | ||||
| -rw-r--r-- | src/libcore/char/methods.rs | 14 | ||||
| -rw-r--r-- | src/libcore/clone.rs | 1 | ||||
| -rw-r--r-- | src/libcore/cmp.rs | 4 | ||||
| -rw-r--r-- | src/libcore/default.rs | 1 | ||||
| -rw-r--r-- | src/libcore/fmt/mod.rs | 2 | ||||
| -rw-r--r-- | src/libcore/hash/mod.rs | 2 | ||||
| -rw-r--r-- | src/libcore/lib.rs | 4 | ||||
| -rw-r--r-- | src/libcore/macros.rs | 35 | ||||
| -rw-r--r-- | src/libcore/marker.rs | 1 | ||||
| -rw-r--r-- | src/libcore/mem/maybe_uninit.rs | 2 | ||||
| -rw-r--r-- | src/libcore/mem/mod.rs | 4 | ||||
| -rw-r--r-- | src/libcore/prelude/v1.rs | 4 |
13 files changed, 7 insertions, 72 deletions
diff --git a/src/libcore/any.rs b/src/libcore/any.rs index 078091a9b54..e8a0a88f12a 100644 --- a/src/libcore/any.rs +++ b/src/libcore/any.rs @@ -470,10 +470,5 @@ impl TypeId { #[stable(feature = "type_name", since = "1.38.0")] #[rustc_const_unstable(feature = "const_type_name")] pub const fn type_name<T: ?Sized>() -> &'static str { - #[cfg(bootstrap)] - unsafe { - intrinsics::type_name::<T>() - } - #[cfg(not(bootstrap))] intrinsics::type_name::<T>() } diff --git a/src/libcore/char/methods.rs b/src/libcore/char/methods.rs index aa834db2b9b..e91bf53c5b4 100644 --- a/src/libcore/char/methods.rs +++ b/src/libcore/char/methods.rs @@ -553,12 +553,7 @@ impl char { /// `XID_Start` is a Unicode Derived Property specified in /// [UAX #31](http://unicode.org/reports/tr31/#NFKC_Modifications), /// mostly similar to `ID_Start` but modified for closure under `NFKx`. - #[cfg_attr(bootstrap, - unstable(feature = "rustc_private", - reason = "mainly needed for compiler internals", - issue = "27812"))] - #[cfg_attr(not(bootstrap), - unstable(feature = "unicode_internals", issue = "0"))] + #[unstable(feature = "unicode_internals", issue = "0")] pub fn is_xid_start(self) -> bool { derived_property::XID_Start(self) } @@ -569,12 +564,7 @@ impl char { /// `XID_Continue` is a Unicode Derived Property specified in /// [UAX #31](http://unicode.org/reports/tr31/#NFKC_Modifications), /// mostly similar to `ID_Continue` but modified for closure under NFKx. - #[cfg_attr(bootstrap, - unstable(feature = "rustc_private", - reason = "mainly needed for compiler internals", - issue = "27812"))] - #[cfg_attr(not(bootstrap), - unstable(feature = "unicode_internals", issue = "0"))] + #[unstable(feature = "unicode_internals", issue = "0")] #[inline] pub fn is_xid_continue(self) -> bool { derived_property::XID_Continue(self) diff --git a/src/libcore/clone.rs b/src/libcore/clone.rs index 0c99356390b..ec22a7ccfe4 100644 --- a/src/libcore/clone.rs +++ b/src/libcore/clone.rs @@ -134,7 +134,6 @@ pub trait Clone : Sized { } /// Derive macro generating an impl of the trait `Clone`. -#[cfg(not(bootstrap))] #[rustc_builtin_macro] #[rustc_macro_transparency = "semitransparent"] #[stable(feature = "builtin_macro_prelude", since = "1.38.0")] diff --git a/src/libcore/cmp.rs b/src/libcore/cmp.rs index 38a52d97da2..b802216036b 100644 --- a/src/libcore/cmp.rs +++ b/src/libcore/cmp.rs @@ -201,7 +201,6 @@ pub trait PartialEq<Rhs: ?Sized = Self> { } /// Derive macro generating an impl of the trait `PartialEq`. -#[cfg(not(bootstrap))] #[rustc_builtin_macro] #[rustc_macro_transparency = "semitransparent"] #[stable(feature = "builtin_macro_prelude", since = "1.38.0")] @@ -265,7 +264,6 @@ pub trait Eq: PartialEq<Self> { } /// Derive macro generating an impl of the trait `Eq`. -#[cfg(not(bootstrap))] #[rustc_builtin_macro] #[rustc_macro_transparency = "semitransparent"] #[stable(feature = "builtin_macro_prelude", since = "1.38.0")] @@ -617,7 +615,6 @@ pub trait Ord: Eq + PartialOrd<Self> { } /// Derive macro generating an impl of the trait `Ord`. -#[cfg(not(bootstrap))] #[rustc_builtin_macro] #[rustc_macro_transparency = "semitransparent"] #[stable(feature = "builtin_macro_prelude", since = "1.38.0")] @@ -867,7 +864,6 @@ pub trait PartialOrd<Rhs: ?Sized = Self>: PartialEq<Rhs> { } /// Derive macro generating an impl of the trait `PartialOrd`. -#[cfg(not(bootstrap))] #[rustc_builtin_macro] #[rustc_macro_transparency = "semitransparent"] #[stable(feature = "builtin_macro_prelude", since = "1.38.0")] diff --git a/src/libcore/default.rs b/src/libcore/default.rs index 8d95e9de158..9b1616ccce4 100644 --- a/src/libcore/default.rs +++ b/src/libcore/default.rs @@ -116,7 +116,6 @@ pub trait Default: Sized { } /// Derive macro generating an impl of the trait `Default`. -#[cfg(not(bootstrap))] #[rustc_builtin_macro] #[rustc_macro_transparency = "semitransparent"] #[stable(feature = "builtin_macro_prelude", since = "1.38.0")] diff --git a/src/libcore/fmt/mod.rs b/src/libcore/fmt/mod.rs index 0ea01d4b84a..d5fae9e7401 100644 --- a/src/libcore/fmt/mod.rs +++ b/src/libcore/fmt/mod.rs @@ -546,7 +546,6 @@ pub trait Debug { } // Separate module to reexport the macro `Debug` from prelude without the trait `Debug`. -#[cfg(not(bootstrap))] pub(crate) mod macros { /// Derive macro generating an impl of the trait `Debug`. #[rustc_builtin_macro] @@ -555,7 +554,6 @@ pub(crate) mod macros { #[allow_internal_unstable(core_intrinsics)] pub macro Debug($item:item) { /* compiler built-in */ } } -#[cfg(not(bootstrap))] #[stable(feature = "builtin_macro_prelude", since = "1.38.0")] #[doc(inline)] pub use macros::Debug; diff --git a/src/libcore/hash/mod.rs b/src/libcore/hash/mod.rs index 685540ba6fc..b3971191123 100644 --- a/src/libcore/hash/mod.rs +++ b/src/libcore/hash/mod.rs @@ -199,7 +199,6 @@ pub trait Hash { } // Separate module to reexport the macro `Hash` from prelude without the trait `Hash`. -#[cfg(not(bootstrap))] pub(crate) mod macros { /// Derive macro generating an impl of the trait `Hash`. #[rustc_builtin_macro] @@ -208,7 +207,6 @@ pub(crate) mod macros { #[allow_internal_unstable(core_intrinsics)] pub macro Hash($item:item) { /* compiler built-in */ } } -#[cfg(not(bootstrap))] #[stable(feature = "builtin_macro_prelude", since = "1.38.0")] #[doc(inline)] pub use macros::Hash; diff --git a/src/libcore/lib.rs b/src/libcore/lib.rs index 678ff768792..c168d5c8a2e 100644 --- a/src/libcore/lib.rs +++ b/src/libcore/lib.rs @@ -63,7 +63,7 @@ #![warn(missing_debug_implementations)] #![deny(intra_doc_link_resolution_failure)] // rustdoc is run without -D warnings #![allow(explicit_outlives_requirements)] -#![cfg_attr(not(bootstrap), allow(incomplete_features))] +#![allow(incomplete_features)] #![feature(allow_internal_unstable)] #![feature(arbitrary_self_types)] @@ -129,7 +129,7 @@ #![feature(structural_match)] #![feature(abi_unadjusted)] #![feature(adx_target_feature)] -#![feature(maybe_uninit_slice, maybe_uninit_array)] +#![feature(maybe_uninit_slice)] #![feature(external_doc)] #![feature(mem_take)] #![feature(associated_type_bounds)] diff --git a/src/libcore/macros.rs b/src/libcore/macros.rs index f9dc53874ac..bbed9516716 100644 --- a/src/libcore/macros.rs +++ b/src/libcore/macros.rs @@ -635,46 +635,11 @@ macro_rules! todo { ($($arg:tt)+) => (panic!("not yet implemented: {}", format_args!($($arg)+))); } -/// Creates an array of [`MaybeUninit`]. -/// -/// This macro constructs an uninitialized array of the type `[MaybeUninit<K>; N]`. -/// It exists solely because bootstrap does not yet support const array-init expressions. -/// -/// [`MaybeUninit`]: mem/union.MaybeUninit.html -// FIXME: Remove both versions of this macro once bootstrap is 1.38. -#[macro_export] -#[unstable(feature = "maybe_uninit_array", issue = "53491")] -#[cfg(bootstrap)] -macro_rules! uninit_array { - // This `assume_init` is safe because an array of `MaybeUninit` does not - // require initialization. - ($t:ty; $size:expr) => (unsafe { - MaybeUninit::<[MaybeUninit<$t>; $size]>::uninit().assume_init() - }); -} - -/// Creates an array of [`MaybeUninit`]. -/// -/// This macro constructs an uninitialized array of the type `[MaybeUninit<K>; N]`. -/// It exists solely because bootstrap does not yet support const array-init expressions. -/// -/// [`MaybeUninit`]: mem/union.MaybeUninit.html -// FIXME: Just inline this version of the macro once bootstrap is 1.38. -#[macro_export] -#[unstable(feature = "maybe_uninit_array", issue = "53491")] -#[cfg(not(bootstrap))] -macro_rules! uninit_array { - ($t:ty; $size:expr) => ( - [MaybeUninit::<$t>::UNINIT; $size] - ); -} - /// Definitions of built-in macros. /// /// Most of the macro properties (stability, visibility, etc.) are taken from the source code here, /// with exception of expansion functions transforming macro inputs into outputs, /// those functions are provided by the compiler. -#[cfg(not(bootstrap))] pub(crate) mod builtin { /// Causes compilation to fail with the given error message when encountered. diff --git a/src/libcore/marker.rs b/src/libcore/marker.rs index 78a27361165..3befd421b01 100644 --- a/src/libcore/marker.rs +++ b/src/libcore/marker.rs @@ -289,7 +289,6 @@ pub trait Copy : Clone { } /// Derive macro generating an impl of the trait `Copy`. -#[cfg(not(bootstrap))] #[rustc_builtin_macro] #[rustc_macro_transparency = "semitransparent"] #[stable(feature = "builtin_macro_prelude", since = "1.38.0")] diff --git a/src/libcore/mem/maybe_uninit.rs b/src/libcore/mem/maybe_uninit.rs index 1bbea02e0c7..49711607262 100644 --- a/src/libcore/mem/maybe_uninit.rs +++ b/src/libcore/mem/maybe_uninit.rs @@ -213,7 +213,7 @@ use crate::mem::ManuallyDrop; #[allow(missing_debug_implementations)] #[stable(feature = "maybe_uninit", since = "1.36.0")] // Lang item so we can wrap other types in it. This is useful for generators. -#[cfg_attr(not(bootstrap), lang = "maybe_uninit")] +#[lang = "maybe_uninit"] #[derive(Copy)] #[repr(transparent)] pub union MaybeUninit<T> { diff --git a/src/libcore/mem/mod.rs b/src/libcore/mem/mod.rs index 2534400b833..87ec05a243d 100644 --- a/src/libcore/mem/mod.rs +++ b/src/libcore/mem/mod.rs @@ -453,7 +453,7 @@ pub const fn needs_drop<T>() -> bool { /// ``` #[inline] #[stable(feature = "rust1", since = "1.0.0")] -#[cfg_attr(bootstrap, allow(deprecated_in_future))] +#[allow(deprecated_in_future)] #[allow(deprecated)] pub unsafe fn zeroed<T>() -> T { intrinsics::panic_if_uninhabited::<T>(); @@ -481,7 +481,7 @@ pub unsafe fn zeroed<T>() -> T { #[inline] #[rustc_deprecated(since = "1.39.0", reason = "use `mem::MaybeUninit` instead")] #[stable(feature = "rust1", since = "1.0.0")] -#[cfg_attr(bootstrap, allow(deprecated_in_future))] +#[allow(deprecated_in_future)] #[allow(deprecated)] pub unsafe fn uninitialized<T>() -> T { intrinsics::panic_if_uninhabited::<T>(); diff --git a/src/libcore/prelude/v1.rs b/src/libcore/prelude/v1.rs index 84cf85f339c..76240379040 100644 --- a/src/libcore/prelude/v1.rs +++ b/src/libcore/prelude/v1.rs @@ -46,16 +46,13 @@ pub use crate::option::Option::{self, Some, None}; pub use crate::result::Result::{self, Ok, Err}; // Re-exported built-in macros -#[cfg(not(bootstrap))] #[stable(feature = "builtin_macro_prelude", since = "1.38.0")] #[doc(no_inline)] pub use crate::fmt::macros::Debug; -#[cfg(not(bootstrap))] #[stable(feature = "builtin_macro_prelude", since = "1.38.0")] #[doc(no_inline)] pub use crate::hash::macros::Hash; -#[cfg(not(bootstrap))] #[stable(feature = "builtin_macro_prelude", since = "1.38.0")] #[doc(no_inline)] pub use crate::{ @@ -83,7 +80,6 @@ pub use crate::{ trace_macros, }; -#[cfg(not(bootstrap))] #[stable(feature = "builtin_macro_prelude", since = "1.38.0")] #[allow(deprecated)] #[doc(no_inline)] |
