#[stable(feature = "global_alloc", since = "1.28.0")]
#[rustc_allocator_nounwind]
pub fn handle_alloc_error(layout: Layout) -> ! {
- #[cfg_attr(bootstrap, allow(improper_ctypes))]
extern "Rust" {
#[lang = "oom"]
fn oom_impl(layout: Layout) -> !;
#![feature(allocator_internals)]
#![feature(on_unimplemented)]
#![feature(rustc_const_unstable)]
-#![cfg_attr(bootstrap, feature(const_vec_new))]
#![feature(slice_partition_dedup)]
#![feature(maybe_uninit_extra, maybe_uninit_slice)]
#![feature(alloc_layout_extra)]
/// ```
#[inline]
#[stable(feature = "rust1", since = "1.0.0")]
- #[cfg_attr(bootstrap, rustc_const_unstable(feature = "const_string_new"))]
pub const fn new() -> String {
String { vec: Vec::new() }
}
/// [`reserve`]: ../../std/vec/struct.Vec.html#method.reserve
/// [owned slice]: ../../std/boxed/struct.Box.html
#[stable(feature = "rust1", since = "1.0.0")]
-#[cfg_attr(all(not(bootstrap), not(test)), rustc_diagnostic_item = "vec_type")]
+#[cfg_attr(not(test), rustc_diagnostic_item = "vec_type")]
pub struct Vec<T> {
buf: RawVec<T>,
len: usize,
/// ```
#[inline]
#[stable(feature = "rust1", since = "1.0.0")]
- #[cfg_attr(bootstrap, rustc_const_unstable(feature = "const_vec_new"))]
pub const fn new() -> Vec<T> {
Vec {
buf: RawVec::NEW,
//! impl bool {}
-#[cfg(not(bootstrap))]
#[lang = "bool"]
impl bool {
/// Returns `Some(t)` if the `bool` is `true`, or `None` otherwise.
/// Derive macro generating an impl of the trait `Clone`.
#[rustc_builtin_macro]
-#[cfg_attr(bootstrap, rustc_macro_transparency = "semitransparent")]
#[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
#[allow_internal_unstable(core_intrinsics, derive_clone_copy)]
pub macro Clone($item:item) { /* compiler built-in */ }
/// Derive macro generating an impl of the trait `PartialEq`.
#[rustc_builtin_macro]
-#[cfg_attr(bootstrap, rustc_macro_transparency = "semitransparent")]
#[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
#[allow_internal_unstable(core_intrinsics)]
pub macro PartialEq($item:item) { /* compiler built-in */ }
/// Derive macro generating an impl of the trait `Eq`.
#[rustc_builtin_macro]
-#[cfg_attr(bootstrap, rustc_macro_transparency = "semitransparent")]
#[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
#[allow_internal_unstable(core_intrinsics, derive_eq)]
pub macro Eq($item:item) { /* compiler built-in */ }
/// Derive macro generating an impl of the trait `Ord`.
#[rustc_builtin_macro]
-#[cfg_attr(bootstrap, rustc_macro_transparency = "semitransparent")]
#[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
#[allow_internal_unstable(core_intrinsics)]
pub macro Ord($item:item) { /* compiler built-in */ }
/// Derive macro generating an impl of the trait `PartialOrd`.
#[rustc_builtin_macro]
-#[cfg_attr(bootstrap, rustc_macro_transparency = "semitransparent")]
#[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
#[allow_internal_unstable(core_intrinsics)]
pub macro PartialOrd($item:item) { /* compiler built-in */ }
/// Derive macro generating an impl of the trait `Default`.
#[rustc_builtin_macro]
-#[cfg_attr(bootstrap, rustc_macro_transparency = "semitransparent")]
#[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
#[allow_internal_unstable(core_intrinsics)]
pub macro Default($item:item) { /* compiler built-in */ }
label="`{Self}` cannot be formatted using `{{:?}}` because it doesn't implement `{Debug}`",
)]
#[doc(alias = "{:?}")]
-#[cfg_attr(bootstrap, lang = "debug_trait")]
-#[cfg_attr(not(bootstrap), rustc_diagnostic_item = "debug_trait")]
+#[rustc_diagnostic_item = "debug_trait"]
pub trait Debug {
/// Formats the value using the given formatter.
///
pub(crate) mod macros {
/// Derive macro generating an impl of the trait `Debug`.
#[rustc_builtin_macro]
- #[cfg_attr(bootstrap, rustc_macro_transparency = "semitransparent")]
#[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
#[allow_internal_unstable(core_intrinsics)]
pub macro Debug($item:item) { /* compiler built-in */ }
pub(crate) mod macros {
/// Derive macro generating an impl of the trait `Hash`.
#[rustc_builtin_macro]
- #[cfg_attr(bootstrap, rustc_macro_transparency = "semitransparent")]
#[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
#[allow_internal_unstable(core_intrinsics)]
pub macro Hash($item:item) { /* compiler built-in */ }
/// The stabilized versions of this intrinsic are available on the integer
/// primitives via the `wrapping_add` method. For example,
/// [`std::u32::wrapping_add`](../../std/primitive.u32.html#method.wrapping_add)
- #[cfg(bootstrap)]
- pub fn overflowing_add<T>(a: T, b: T) -> T;
- /// Returns (a - b) mod 2<sup>N</sup>, where N is the width of T in bits.
- /// The stabilized versions of this intrinsic are available on the integer
- /// primitives via the `wrapping_sub` method. For example,
- /// [`std::u32::wrapping_sub`](../../std/primitive.u32.html#method.wrapping_sub)
- #[cfg(bootstrap)]
- pub fn overflowing_sub<T>(a: T, b: T) -> T;
- /// Returns (a * b) mod 2<sup>N</sup>, where N is the width of T in bits.
- /// The stabilized versions of this intrinsic are available on the integer
- /// primitives via the `wrapping_mul` method. For example,
- /// [`std::u32::wrapping_mul`](../../std/primitive.u32.html#method.wrapping_mul)
- #[cfg(bootstrap)]
- pub fn overflowing_mul<T>(a: T, b: T) -> T;
-
- /// Returns (a + b) mod 2<sup>N</sup>, where N is the width of T in bits.
- /// The stabilized versions of this intrinsic are available on the integer
- /// primitives via the `wrapping_add` method. For example,
- /// [`std::u32::wrapping_add`](../../std/primitive.u32.html#method.wrapping_add)
- #[cfg(not(bootstrap))]
pub fn wrapping_add<T>(a: T, b: T) -> T;
/// Returns (a - b) mod 2<sup>N</sup>, where N is the width of T in bits.
/// The stabilized versions of this intrinsic are available on the integer
/// primitives via the `wrapping_sub` method. For example,
/// [`std::u32::wrapping_sub`](../../std/primitive.u32.html#method.wrapping_sub)
- #[cfg(not(bootstrap))]
pub fn wrapping_sub<T>(a: T, b: T) -> T;
/// Returns (a * b) mod 2<sup>N</sup>, where N is the width of T in bits.
/// The stabilized versions of this intrinsic are available on the integer
/// primitives via the `wrapping_mul` method. For example,
/// [`std::u32::wrapping_mul`](../../std/primitive.u32.html#method.wrapping_mul)
- #[cfg(not(bootstrap))]
pub fn wrapping_mul<T>(a: T, b: T) -> T;
/// Computes `a + b`, while saturating at numeric bounds.
#![feature(link_llvm_intrinsics)]
#![feature(never_type)]
#![feature(nll)]
-#![cfg_attr(bootstrap, feature(bind_by_move_pattern_guards))]
#![feature(exhaustive_patterns)]
#![feature(no_core)]
#![feature(on_unimplemented)]
#![feature(rtm_target_feature)]
#![feature(f16c_target_feature)]
#![feature(hexagon_target_feature)]
-#![cfg_attr(bootstrap, feature(const_slice_len))]
-#![cfg_attr(bootstrap, feature(const_str_as_bytes))]
-#![cfg_attr(bootstrap, feature(const_str_len))]
#![feature(const_int_conversion)]
#![feature(const_transmute)]
#![feature(non_exhaustive)]
pub macro test($item:item) { /* compiler built-in */ }
/// Attribute macro applied to a function to turn it into a benchmark test.
- #[cfg_attr(not(bootstrap), unstable(soft, feature = "test", issue = "50297",
- reason = "`bench` is a part of custom test frameworks which are unstable"))]
- #[cfg_attr(bootstrap, unstable(feature = "test", issue = "50297",
- reason = "`bench` is a part of custom test frameworks which are unstable"))]
+ #[unstable(soft, feature = "test", issue = "50297",
+ reason = "`bench` is a part of custom test frameworks which are unstable")]
#[allow_internal_unstable(test, rustc_attrs)]
#[rustc_builtin_macro]
pub macro bench($item:item) { /* compiler built-in */ }
/// Derive macro generating an impl of the trait `Copy`.
#[rustc_builtin_macro]
-#[cfg_attr(bootstrap, rustc_macro_transparency = "semitransparent")]
#[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
#[allow_internal_unstable(core_intrinsics, derive_clone_copy)]
pub macro Copy($item:item) { /* compiler built-in */ }
without modifying the original"]
#[inline]
pub const fn wrapping_add(self, rhs: Self) -> Self {
- #[cfg(bootstrap)] {
- intrinsics::overflowing_add(self, rhs)
- }
-
- #[cfg(not(bootstrap))] {
- intrinsics::wrapping_add(self, rhs)
- }
+ intrinsics::wrapping_add(self, rhs)
}
}
without modifying the original"]
#[inline]
pub const fn wrapping_sub(self, rhs: Self) -> Self {
- #[cfg(bootstrap)] {
- intrinsics::overflowing_sub(self, rhs)
- }
-
- #[cfg(not(bootstrap))] {
- intrinsics::wrapping_sub(self, rhs)
- }
+ intrinsics::wrapping_sub(self, rhs)
}
}
without modifying the original"]
#[inline]
pub const fn wrapping_mul(self, rhs: Self) -> Self {
- #[cfg(bootstrap)] {
- intrinsics::overflowing_mul(self, rhs)
- }
-
- #[cfg(not(bootstrap))] {
- intrinsics::wrapping_mul(self, rhs)
- }
+ intrinsics::wrapping_mul(self, rhs)
}
}
without modifying the original"]
#[inline]
pub const fn wrapping_add(self, rhs: Self) -> Self {
- #[cfg(bootstrap)] {
- intrinsics::overflowing_add(self, rhs)
- }
-
- #[cfg(not(bootstrap))] {
- intrinsics::wrapping_add(self, rhs)
- }
+ intrinsics::wrapping_add(self, rhs)
}
}
without modifying the original"]
#[inline]
pub const fn wrapping_sub(self, rhs: Self) -> Self {
- #[cfg(bootstrap)] {
- intrinsics::overflowing_sub(self, rhs)
- }
-
- #[cfg(not(bootstrap))] {
- intrinsics::wrapping_sub(self, rhs)
- }
+ intrinsics::wrapping_sub(self, rhs)
}
}
without modifying the original"]
#[inline]
pub const fn wrapping_mul(self, rhs: Self) -> Self {
- #[cfg(bootstrap)] {
- intrinsics::overflowing_mul(self, rhs)
- }
-
- #[cfg(not(bootstrap))] {
- intrinsics::wrapping_mul(self, rhs)
- }
+ intrinsics::wrapping_mul(self, rhs)
}
doc_comment! {
}
// NOTE This function never crosses the FFI boundary; it's a Rust-to-Rust call
- #[cfg_attr(bootstrap, allow(improper_ctypes))]
extern "Rust" {
#[lang = "panic_impl"]
fn panic_impl(pi: &PanicInfo<'_>) -> !;
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[inline]
- #[cfg_attr(bootstrap, rustc_const_unstable(feature = "const_slice_len"))]
// SAFETY: const sound because we transmute out the length field as a usize (which it must be)
- #[cfg_attr(not(bootstrap), allow_internal_unstable(const_fn_union))]
+ #[allow_internal_unstable(const_fn_union)]
pub const fn len(&self) -> usize {
unsafe {
crate::ptr::Repr { rust: self }.raw.len
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[inline]
- #[cfg_attr(bootstrap, rustc_const_unstable(feature = "const_slice_len"))]
pub const fn is_empty(&self) -> bool {
self.len() == 0
}
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[inline]
- #[cfg_attr(bootstrap, rustc_const_unstable(feature = "const_str_len"))]
pub const fn len(&self) -> usize {
self.as_bytes().len()
}
/// ```
#[inline]
#[stable(feature = "rust1", since = "1.0.0")]
- #[cfg_attr(bootstrap, rustc_const_unstable(feature = "const_str_len"))]
pub const fn is_empty(&self) -> bool {
self.len() == 0
}
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[inline(always)]
- #[cfg_attr(bootstrap, rustc_const_unstable(feature = "const_str_as_bytes"))]
// SAFETY: const sound because we transmute two types with the same layout
- #[cfg_attr(not(bootstrap), allow_internal_unstable(const_fn_union))]
+ #[allow_internal_unstable(const_fn_union)]
pub const fn as_bytes(&self) -> &[u8] {
#[repr(C)]
union Slices<'a> {
/// To quote `$` itself, use `$$`.
#[unstable(feature = "proc_macro_quote", issue = "54722")]
#[allow_internal_unstable(proc_macro_def_site)]
-#[cfg_attr(not(bootstrap), rustc_builtin_macro)]
+#[rustc_builtin_macro]
pub macro quote ($($t:tt)*) { /* compiler built-in */ }
#[unstable(feature = "proc_macro_internals", issue = "27812")]
///
/// [rustc guide]: https://rust-lang.github.io/rustc-guide/ty.html
#[derive(Copy, Clone)]
-#[cfg_attr(not(bootstrap), rustc_diagnostic_item = "TyCtxt")]
+#[rustc_diagnostic_item = "TyCtxt"]
pub struct TyCtxt<'tcx> {
gcx: &'tcx GlobalCtxt<'tcx>,
}
}
}
-#[cfg_attr(not(bootstrap), rustc_diagnostic_item = "Ty")]
+#[rustc_diagnostic_item = "Ty"]
pub type Ty<'tcx> = &'tcx TyS<'tcx>;
impl<'tcx> rustc_serialize::UseSpecializedEncodable for Ty<'tcx> {}
/// AST structure in `libsyntax/ast.rs` as well.
#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
RustcEncodable, RustcDecodable, HashStable, Debug)]
-#[cfg_attr(not(bootstrap), rustc_diagnostic_item = "TyKind")]
+#[rustc_diagnostic_item = "TyKind"]
pub enum TyKind<'tcx> {
/// The primitive boolean type. Written as `bool`.
Bool,
#![feature(in_band_lifetimes)]
#![feature(nll)]
-#![cfg_attr(bootstrap, feature(bind_by_move_pattern_guards))]
#![recursion_limit="256"]
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/",
html_playground_url = "https://play.rust-lang.org/")]
-#![cfg_attr(bootstrap, feature(bind_by_move_pattern_guards))]
#![feature(rustc_private)]
#![feature(arbitrary_self_types)]
#![feature(box_patterns)]
#![feature(array_error_internals)]
#![feature(asm)]
#![feature(associated_type_bounds)]
-#![cfg_attr(bootstrap, feature(bind_by_move_pattern_guards))]
#![feature(box_syntax)]
#![feature(c_variadic)]
#![feature(cfg_target_has_atomic)]
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/",
test(attr(deny(warnings))))]
-#![cfg_attr(bootstrap, feature(bind_by_move_pattern_guards))]
#![feature(box_syntax)]
#![feature(const_fn)]
#![feature(const_transmute)]