update cfg(bootstrap)
This commit is contained in:
parent
79b00df93a
commit
2af3ba9a8a
29 changed files with 49 additions and 169 deletions
|
@ -1,4 +1,4 @@
|
|||
#![cfg_attr(not(bootstrap), allow(rustc::symbol_intern_string_literal))]
|
||||
#![allow(rustc::symbol_intern_string_literal)]
|
||||
|
||||
use rustc_span::create_default_session_globals_then;
|
||||
|
||||
|
|
|
@ -692,7 +692,7 @@ fn check_new_solver_banned_features(sess: &Session, features: &Features) {
|
|||
.find(|feat| feat.gate_name == sym::generic_const_exprs)
|
||||
.map(|feat| feat.attr_sp)
|
||||
{
|
||||
#[cfg_attr(not(bootstrap), allow(rustc::symbol_intern_string_literal))]
|
||||
#[allow(rustc::symbol_intern_string_literal)]
|
||||
sess.dcx().emit_err(errors::IncompatibleFeatures {
|
||||
spans: vec![gce_span],
|
||||
f1: Symbol::intern("-Znext-solver=globally"),
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#![cfg_attr(not(bootstrap), allow(rustc::symbol_intern_string_literal))]
|
||||
#![allow(rustc::symbol_intern_string_literal)]
|
||||
|
||||
use rustc_data_structures::stable_hasher::Hash64;
|
||||
use rustc_span::def_id::{DefPathHash, StableCrateId};
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#![cfg_attr(not(bootstrap), allow(rustc::symbol_intern_string_literal))]
|
||||
#![allow(rustc::symbol_intern_string_literal)]
|
||||
|
||||
use rustc_span::{Symbol, create_default_session_globals_then};
|
||||
|
||||
|
|
|
@ -867,7 +867,7 @@ impl<'a, 'tcx> CrateLoader<'a, 'tcx> {
|
|||
// First up we check for global allocators. Look at the crate graph here
|
||||
// and see what's a global allocator, including if we ourselves are a
|
||||
// global allocator.
|
||||
#[cfg_attr(not(bootstrap), allow(rustc::symbol_intern_string_literal))]
|
||||
#[allow(rustc::symbol_intern_string_literal)]
|
||||
let this_crate = Symbol::intern("this crate");
|
||||
|
||||
let mut global_allocator = self.cstore.has_global_allocator.then_some(this_crate);
|
||||
|
|
|
@ -871,7 +871,7 @@ impl MetadataBlob {
|
|||
|
||||
let def_kind = root.tables.def_kind.get(blob, item).unwrap();
|
||||
let def_key = root.tables.def_keys.get(blob, item).unwrap().decode(blob);
|
||||
#[cfg_attr(not(bootstrap), allow(rustc::symbol_intern_string_literal))]
|
||||
#[allow(rustc::symbol_intern_string_literal)]
|
||||
let def_name = if item == CRATE_DEF_INDEX {
|
||||
kw::Crate
|
||||
} else {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#![cfg_attr(not(bootstrap), allow(rustc::symbol_intern_string_literal))]
|
||||
#![allow(rustc::symbol_intern_string_literal)]
|
||||
|
||||
use std::assert_matches::assert_matches;
|
||||
use std::io::prelude::*;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#![cfg_attr(not(bootstrap), allow(rustc::symbol_intern_string_literal))]
|
||||
#![allow(rustc::symbol_intern_string_literal)]
|
||||
|
||||
use rustc_ast::token::{self, IdentIsRaw};
|
||||
use rustc_ast::tokenstream::{TokenStream, TokenTree};
|
||||
|
|
|
@ -3155,7 +3155,7 @@ impl<'ast, 'ra: 'ast, 'tcx> LateResolutionVisitor<'_, 'ast, 'ra, 'tcx> {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg_attr(not(bootstrap), allow(rustc::symbol_intern_string_literal))]
|
||||
#[allow(rustc::symbol_intern_string_literal)]
|
||||
let existing_name = match &in_scope_lifetimes[..] {
|
||||
[] => Symbol::intern("'a"),
|
||||
[(existing, _)] => existing.name,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#![cfg_attr(not(bootstrap), allow(rustc::symbol_intern_string_literal))]
|
||||
#![allow(rustc::symbol_intern_string_literal)]
|
||||
|
||||
use super::*;
|
||||
|
||||
|
|
|
@ -2028,8 +2028,7 @@ impl<Args: Tuple, F: Fn<Args> + ?Sized, A: Allocator> Fn<Args> for Box<F, A> {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg_attr(bootstrap, unstable(feature = "async_closure", issue = "62290"))]
|
||||
#[cfg_attr(not(bootstrap), stable(feature = "async_closure", since = "1.85.0"))]
|
||||
#[stable(feature = "async_closure", since = "1.85.0")]
|
||||
impl<Args: Tuple, F: AsyncFnOnce<Args> + ?Sized, A: Allocator> AsyncFnOnce<Args> for Box<F, A> {
|
||||
type Output = F::Output;
|
||||
type CallOnceFuture = F::CallOnceFuture;
|
||||
|
@ -2039,8 +2038,7 @@ impl<Args: Tuple, F: AsyncFnOnce<Args> + ?Sized, A: Allocator> AsyncFnOnce<Args>
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg_attr(bootstrap, unstable(feature = "async_closure", issue = "62290"))]
|
||||
#[cfg_attr(not(bootstrap), stable(feature = "async_closure", since = "1.85.0"))]
|
||||
#[stable(feature = "async_closure", since = "1.85.0")]
|
||||
impl<Args: Tuple, F: AsyncFnMut<Args> + ?Sized, A: Allocator> AsyncFnMut<Args> for Box<F, A> {
|
||||
type CallRefFuture<'a>
|
||||
= F::CallRefFuture<'a>
|
||||
|
@ -2052,8 +2050,7 @@ impl<Args: Tuple, F: AsyncFnMut<Args> + ?Sized, A: Allocator> AsyncFnMut<Args> f
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg_attr(bootstrap, unstable(feature = "async_closure", issue = "62290"))]
|
||||
#[cfg_attr(not(bootstrap), stable(feature = "async_closure", since = "1.85.0"))]
|
||||
#[stable(feature = "async_closure", since = "1.85.0")]
|
||||
impl<Args: Tuple, F: AsyncFn<Args> + ?Sized, A: Allocator> AsyncFn<Args> for Box<F, A> {
|
||||
extern "rust-call" fn async_call(&self, args: Args) -> Self::CallRefFuture<'_> {
|
||||
F::async_call(self, args)
|
||||
|
|
|
@ -91,7 +91,6 @@
|
|||
//
|
||||
// Library features:
|
||||
// tidy-alphabetical-start
|
||||
#![cfg_attr(bootstrap, feature(async_closure))]
|
||||
#![cfg_attr(test, feature(str_as_str))]
|
||||
#![feature(alloc_layout_extra)]
|
||||
#![feature(allocator_api)]
|
||||
|
|
|
@ -65,7 +65,6 @@ pub macro global_asm("assembly template", $(operands,)* $(options($(option),*))?
|
|||
// When stabilizing this, update the comment on `core::intrinsics::breakpoint`.
|
||||
#[unstable(feature = "breakpoint", issue = "133724")]
|
||||
#[inline(always)]
|
||||
#[cfg(not(bootstrap))]
|
||||
pub fn breakpoint() {
|
||||
core::intrinsics::breakpoint();
|
||||
}
|
||||
|
|
|
@ -133,9 +133,8 @@ pub trait AsyncDrop {
|
|||
}
|
||||
|
||||
#[lang = "async_destruct"]
|
||||
#[cfg_attr(bootstrap, rustc_deny_explicit_impl(implement_via_object = false))]
|
||||
#[cfg_attr(not(bootstrap), rustc_deny_explicit_impl)]
|
||||
#[cfg_attr(not(bootstrap), rustc_do_not_implement_via_object)]
|
||||
#[rustc_deny_explicit_impl]
|
||||
#[rustc_do_not_implement_via_object]
|
||||
trait AsyncDestruct {
|
||||
type AsyncDestructor: Future<Output = ()>;
|
||||
}
|
||||
|
|
|
@ -1382,22 +1382,10 @@ pub unsafe fn prefetch_write_instruction<T>(_data: *const T, _locality: i32) {
|
|||
#[rustc_intrinsic]
|
||||
#[rustc_intrinsic_must_be_overridden]
|
||||
#[rustc_nounwind]
|
||||
#[cfg(not(bootstrap))]
|
||||
pub fn breakpoint() {
|
||||
unreachable!()
|
||||
}
|
||||
|
||||
/// Executes a breakpoint trap, for inspection by a debugger.
|
||||
///
|
||||
/// This intrinsic does not have a stable counterpart.
|
||||
#[rustc_intrinsic]
|
||||
#[rustc_intrinsic_must_be_overridden]
|
||||
#[rustc_nounwind]
|
||||
#[cfg(bootstrap)]
|
||||
pub unsafe fn breakpoint() {
|
||||
unreachable!()
|
||||
}
|
||||
|
||||
/// Magic intrinsic that derives its meaning from attributes
|
||||
/// attached to the function.
|
||||
///
|
||||
|
@ -3323,8 +3311,8 @@ pub const fn mul_with_overflow<T: Copy>(_x: T, _y: T) -> (T, bool) {
|
|||
#[unstable(feature = "core_intrinsics", issue = "none")]
|
||||
#[rustc_const_unstable(feature = "const_carrying_mul_add", issue = "85532")]
|
||||
#[rustc_nounwind]
|
||||
#[cfg_attr(not(bootstrap), rustc_intrinsic)]
|
||||
#[cfg_attr(not(bootstrap), miri::intrinsic_fallback_is_spec)]
|
||||
#[rustc_intrinsic]
|
||||
#[miri::intrinsic_fallback_is_spec]
|
||||
pub const fn carrying_mul_add<T: ~const fallback::CarryingMulAdd<Unsigned = U>, U>(
|
||||
multiplier: T,
|
||||
multiplicand: T,
|
||||
|
@ -3969,21 +3957,6 @@ pub const fn is_val_statically_known<T: Copy>(_arg: T) -> bool {
|
|||
false
|
||||
}
|
||||
|
||||
#[rustc_nounwind]
|
||||
#[inline]
|
||||
#[rustc_intrinsic]
|
||||
#[rustc_intrinsic_const_stable_indirect]
|
||||
#[rustc_allow_const_fn_unstable(const_swap_nonoverlapping)] // this is anyway not called since CTFE implements the intrinsic
|
||||
#[cfg(bootstrap)]
|
||||
pub const unsafe fn typed_swap<T>(x: *mut T, y: *mut T) {
|
||||
// SAFETY: The caller provided single non-overlapping items behind
|
||||
// pointers, so swapping them with `count: 1` is fine.
|
||||
unsafe { ptr::swap_nonoverlapping(x, y, 1) };
|
||||
}
|
||||
|
||||
#[cfg(bootstrap)]
|
||||
pub use typed_swap as typed_swap_nonoverlapping;
|
||||
|
||||
/// Non-overlapping *typed* swap of a single value.
|
||||
///
|
||||
/// The codegen backends will replace this with a better implementation when
|
||||
|
@ -3999,7 +3972,6 @@ pub use typed_swap as typed_swap_nonoverlapping;
|
|||
#[rustc_intrinsic]
|
||||
#[rustc_intrinsic_const_stable_indirect]
|
||||
#[rustc_allow_const_fn_unstable(const_swap_nonoverlapping)] // this is anyway not called since CTFE implements the intrinsic
|
||||
#[cfg(not(bootstrap))]
|
||||
pub const unsafe fn typed_swap_nonoverlapping<T>(x: *mut T, y: *mut T) {
|
||||
// SAFETY: The caller provided single non-overlapping items behind
|
||||
// pointers, so swapping them with `count: 1` is fine.
|
||||
|
|
|
@ -623,7 +623,6 @@ extern "rust-intrinsic" {
|
|||
/// and others do not.
|
||||
///
|
||||
/// `T` must be a vector of floats.
|
||||
#[cfg(not(bootstrap))]
|
||||
#[rustc_nounwind]
|
||||
pub fn simd_relaxed_fma<T>(x: T, y: T, z: T) -> T;
|
||||
|
||||
|
|
|
@ -107,7 +107,6 @@
|
|||
//
|
||||
// Library features:
|
||||
// tidy-alphabetical-start
|
||||
#![cfg_attr(bootstrap, feature(do_not_recommend))]
|
||||
#![feature(array_ptr_get)]
|
||||
#![feature(asm_experimental_arch)]
|
||||
#![feature(bigint_helper_methods)]
|
||||
|
|
|
@ -141,9 +141,8 @@ unsafe impl<T: Sync + ?Sized> Send for &T {}
|
|||
)]
|
||||
#[fundamental] // for Default, for example, which requires that `[T]: !Default` be evaluatable
|
||||
#[rustc_specialization_trait]
|
||||
#[cfg_attr(bootstrap, rustc_deny_explicit_impl(implement_via_object = false))]
|
||||
#[cfg_attr(not(bootstrap), rustc_deny_explicit_impl)]
|
||||
#[cfg_attr(not(bootstrap), rustc_do_not_implement_via_object)]
|
||||
#[rustc_deny_explicit_impl]
|
||||
#[rustc_do_not_implement_via_object]
|
||||
#[rustc_coinductive]
|
||||
pub trait Sized {
|
||||
// Empty.
|
||||
|
@ -183,9 +182,8 @@ pub trait Sized {
|
|||
/// [^1]: Formerly known as *object safe*.
|
||||
#[unstable(feature = "unsize", issue = "18598")]
|
||||
#[lang = "unsize"]
|
||||
#[cfg_attr(bootstrap, rustc_deny_explicit_impl(implement_via_object = false))]
|
||||
#[cfg_attr(not(bootstrap), rustc_deny_explicit_impl)]
|
||||
#[cfg_attr(not(bootstrap), rustc_do_not_implement_via_object)]
|
||||
#[rustc_deny_explicit_impl]
|
||||
#[rustc_do_not_implement_via_object]
|
||||
pub trait Unsize<T: ?Sized> {
|
||||
// Empty.
|
||||
}
|
||||
|
@ -819,9 +817,8 @@ impl<T: ?Sized> StructuralPartialEq for PhantomData<T> {}
|
|||
reason = "this trait is unlikely to ever be stabilized, use `mem::discriminant` instead"
|
||||
)]
|
||||
#[lang = "discriminant_kind"]
|
||||
#[cfg_attr(bootstrap, rustc_deny_explicit_impl(implement_via_object = false))]
|
||||
#[cfg_attr(not(bootstrap), rustc_deny_explicit_impl)]
|
||||
#[cfg_attr(not(bootstrap), rustc_do_not_implement_via_object)]
|
||||
#[rustc_deny_explicit_impl]
|
||||
#[rustc_do_not_implement_via_object]
|
||||
pub trait DiscriminantKind {
|
||||
/// The type of the discriminant, which must satisfy the trait
|
||||
/// bounds required by `mem::Discriminant`.
|
||||
|
@ -962,10 +959,9 @@ marker_impls! {
|
|||
#[unstable(feature = "const_destruct", issue = "133214")]
|
||||
#[lang = "destruct"]
|
||||
#[rustc_on_unimplemented(message = "can't drop `{Self}`", append_const_msg)]
|
||||
#[cfg_attr(bootstrap, rustc_deny_explicit_impl(implement_via_object = false))]
|
||||
#[cfg_attr(not(bootstrap), rustc_deny_explicit_impl)]
|
||||
#[cfg_attr(not(bootstrap), rustc_do_not_implement_via_object)]
|
||||
#[cfg_attr(not(bootstrap), const_trait)]
|
||||
#[rustc_deny_explicit_impl]
|
||||
#[rustc_do_not_implement_via_object]
|
||||
#[const_trait]
|
||||
pub trait Destruct {}
|
||||
|
||||
/// A marker for tuple types.
|
||||
|
@ -975,9 +971,8 @@ pub trait Destruct {}
|
|||
#[unstable(feature = "tuple_trait", issue = "none")]
|
||||
#[lang = "tuple_trait"]
|
||||
#[diagnostic::on_unimplemented(message = "`{Self}` is not a tuple")]
|
||||
#[cfg_attr(bootstrap, rustc_deny_explicit_impl(implement_via_object = false))]
|
||||
#[cfg_attr(not(bootstrap), rustc_deny_explicit_impl)]
|
||||
#[cfg_attr(not(bootstrap), rustc_do_not_implement_via_object)]
|
||||
#[rustc_deny_explicit_impl]
|
||||
#[rustc_do_not_implement_via_object]
|
||||
pub trait Tuple {}
|
||||
|
||||
/// A marker for pointer-like types.
|
||||
|
@ -996,10 +991,9 @@ pub trait Tuple {}
|
|||
message = "`{Self}` needs to have the same ABI as a pointer",
|
||||
label = "`{Self}` needs to be a pointer-like type"
|
||||
)]
|
||||
#[cfg_attr(not(bootstrap), rustc_do_not_implement_via_object)]
|
||||
#[rustc_do_not_implement_via_object]
|
||||
pub trait PointerLike {}
|
||||
|
||||
#[cfg(not(bootstrap))]
|
||||
marker_impls! {
|
||||
#[unstable(feature = "pointer_like_trait", issue = "none")]
|
||||
PointerLike for
|
||||
|
@ -1086,9 +1080,8 @@ marker_impls! {
|
|||
reason = "internal trait for implementing various traits for all function pointers"
|
||||
)]
|
||||
#[lang = "fn_ptr_trait"]
|
||||
#[cfg_attr(bootstrap, rustc_deny_explicit_impl(implement_via_object = false))]
|
||||
#[cfg_attr(not(bootstrap), rustc_deny_explicit_impl)]
|
||||
#[cfg_attr(not(bootstrap), rustc_do_not_implement_via_object)]
|
||||
#[rustc_deny_explicit_impl]
|
||||
#[rustc_do_not_implement_via_object]
|
||||
pub trait FnPtr: Copy + Clone {
|
||||
/// Returns the address of the function pointer.
|
||||
#[lang = "fn_ptr_addr"]
|
||||
|
@ -1099,7 +1092,6 @@ pub trait FnPtr: Copy + Clone {
|
|||
#[rustc_builtin_macro(CoercePointee, attributes(pointee))]
|
||||
#[allow_internal_unstable(dispatch_from_dyn, coerce_unsized, unsize)]
|
||||
#[unstable(feature = "derive_coerce_pointee", issue = "123430")]
|
||||
#[cfg(not(bootstrap))]
|
||||
pub macro CoercePointee($item:item) {
|
||||
/* compiler built-in */
|
||||
}
|
||||
|
|
|
@ -84,9 +84,8 @@ use crate::marker::{ConstParamTy_, UnsizedConstParamTy};
|
|||
/// `usize` is stable, but not portable.
|
||||
#[unstable(feature = "transmutability", issue = "99571")]
|
||||
#[lang = "transmute_trait"]
|
||||
#[cfg_attr(bootstrap, rustc_deny_explicit_impl(implement_via_object = false))]
|
||||
#[cfg_attr(not(bootstrap), rustc_deny_explicit_impl)]
|
||||
#[cfg_attr(not(bootstrap), rustc_do_not_implement_via_object)]
|
||||
#[rustc_deny_explicit_impl]
|
||||
#[rustc_do_not_implement_via_object]
|
||||
#[rustc_coinductive]
|
||||
pub unsafe trait TransmuteFrom<Src, const ASSUME: Assume = { Assume::NOTHING }>
|
||||
where
|
||||
|
|
|
@ -73,7 +73,7 @@
|
|||
append_const_msg
|
||||
)]
|
||||
#[doc(alias = "+")]
|
||||
#[cfg_attr(not(bootstrap), const_trait)]
|
||||
#[const_trait]
|
||||
pub trait Add<Rhs = Self> {
|
||||
/// The resulting type after applying the `+` operator.
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
|
@ -95,18 +95,6 @@ pub trait Add<Rhs = Self> {
|
|||
macro_rules! add_impl {
|
||||
($($t:ty)*) => ($(
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[cfg(bootstrap)]
|
||||
impl Add for $t {
|
||||
type Output = $t;
|
||||
|
||||
#[inline]
|
||||
#[track_caller]
|
||||
#[rustc_inherit_overflow_checks]
|
||||
fn add(self, other: $t) -> $t { self + other }
|
||||
}
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[cfg(not(bootstrap))]
|
||||
impl const Add for $t {
|
||||
type Output = $t;
|
||||
|
||||
|
|
|
@ -4,8 +4,7 @@ use crate::marker::Tuple;
|
|||
/// An async-aware version of the [`Fn`](crate::ops::Fn) trait.
|
||||
///
|
||||
/// All `async fn` and functions returning futures implement this trait.
|
||||
#[cfg_attr(bootstrap, unstable(feature = "async_closure", issue = "62290"))]
|
||||
#[cfg_attr(not(bootstrap), stable(feature = "async_closure", since = "1.85.0"))]
|
||||
#[stable(feature = "async_closure", since = "1.85.0")]
|
||||
#[rustc_paren_sugar]
|
||||
#[fundamental]
|
||||
#[must_use = "async closures are lazy and do nothing unless called"]
|
||||
|
@ -19,8 +18,7 @@ pub trait AsyncFn<Args: Tuple>: AsyncFnMut<Args> {
|
|||
/// An async-aware version of the [`FnMut`](crate::ops::FnMut) trait.
|
||||
///
|
||||
/// All `async fn` and functions returning futures implement this trait.
|
||||
#[cfg_attr(bootstrap, unstable(feature = "async_closure", issue = "62290"))]
|
||||
#[cfg_attr(not(bootstrap), stable(feature = "async_closure", since = "1.85.0"))]
|
||||
#[stable(feature = "async_closure", since = "1.85.0")]
|
||||
#[rustc_paren_sugar]
|
||||
#[fundamental]
|
||||
#[must_use = "async closures are lazy and do nothing unless called"]
|
||||
|
@ -41,8 +39,7 @@ pub trait AsyncFnMut<Args: Tuple>: AsyncFnOnce<Args> {
|
|||
/// An async-aware version of the [`FnOnce`](crate::ops::FnOnce) trait.
|
||||
///
|
||||
/// All `async fn` and functions returning futures implement this trait.
|
||||
#[cfg_attr(bootstrap, unstable(feature = "async_closure", issue = "62290"))]
|
||||
#[cfg_attr(not(bootstrap), stable(feature = "async_closure", since = "1.85.0"))]
|
||||
#[stable(feature = "async_closure", since = "1.85.0")]
|
||||
#[rustc_paren_sugar]
|
||||
#[fundamental]
|
||||
#[must_use = "async closures are lazy and do nothing unless called"]
|
||||
|
@ -67,8 +64,7 @@ mod impls {
|
|||
use super::{AsyncFn, AsyncFnMut, AsyncFnOnce};
|
||||
use crate::marker::Tuple;
|
||||
|
||||
#[cfg_attr(bootstrap, unstable(feature = "async_closure", issue = "62290"))]
|
||||
#[cfg_attr(not(bootstrap), stable(feature = "async_closure", since = "1.85.0"))]
|
||||
#[stable(feature = "async_closure", since = "1.85.0")]
|
||||
impl<A: Tuple, F: ?Sized> AsyncFn<A> for &F
|
||||
where
|
||||
F: AsyncFn<A>,
|
||||
|
@ -78,8 +74,7 @@ mod impls {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg_attr(bootstrap, unstable(feature = "async_closure", issue = "62290"))]
|
||||
#[cfg_attr(not(bootstrap), stable(feature = "async_closure", since = "1.85.0"))]
|
||||
#[stable(feature = "async_closure", since = "1.85.0")]
|
||||
impl<A: Tuple, F: ?Sized> AsyncFnMut<A> for &F
|
||||
where
|
||||
F: AsyncFn<A>,
|
||||
|
@ -94,8 +89,7 @@ mod impls {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg_attr(bootstrap, unstable(feature = "async_closure", issue = "62290"))]
|
||||
#[cfg_attr(not(bootstrap), stable(feature = "async_closure", since = "1.85.0"))]
|
||||
#[stable(feature = "async_closure", since = "1.85.0")]
|
||||
impl<'a, A: Tuple, F: ?Sized> AsyncFnOnce<A> for &'a F
|
||||
where
|
||||
F: AsyncFn<A>,
|
||||
|
@ -108,8 +102,7 @@ mod impls {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg_attr(bootstrap, unstable(feature = "async_closure", issue = "62290"))]
|
||||
#[cfg_attr(not(bootstrap), stable(feature = "async_closure", since = "1.85.0"))]
|
||||
#[stable(feature = "async_closure", since = "1.85.0")]
|
||||
impl<A: Tuple, F: ?Sized> AsyncFnMut<A> for &mut F
|
||||
where
|
||||
F: AsyncFnMut<A>,
|
||||
|
@ -124,8 +117,7 @@ mod impls {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg_attr(bootstrap, unstable(feature = "async_closure", issue = "62290"))]
|
||||
#[cfg_attr(not(bootstrap), stable(feature = "async_closure", since = "1.85.0"))]
|
||||
#[stable(feature = "async_closure", since = "1.85.0")]
|
||||
impl<'a, A: Tuple, F: ?Sized> AsyncFnOnce<A> for &'a mut F
|
||||
where
|
||||
F: AsyncFnMut<A>,
|
||||
|
|
|
@ -133,7 +133,7 @@
|
|||
#[doc(alias = "&*")]
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[rustc_diagnostic_item = "Deref"]
|
||||
#[cfg_attr(not(bootstrap), const_trait)]
|
||||
#[const_trait]
|
||||
pub trait Deref {
|
||||
/// The resulting type after dereferencing.
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
|
@ -148,18 +148,6 @@ pub trait Deref {
|
|||
fn deref(&self) -> &Self::Target;
|
||||
}
|
||||
|
||||
#[cfg(bootstrap)]
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
impl<T: ?Sized> Deref for &T {
|
||||
type Target = T;
|
||||
|
||||
#[rustc_diagnostic_item = "noop_method_deref"]
|
||||
fn deref(&self) -> &T {
|
||||
*self
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(not(bootstrap))]
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
impl<T: ?Sized> const Deref for &T {
|
||||
type Target = T;
|
||||
|
@ -173,17 +161,6 @@ impl<T: ?Sized> const Deref for &T {
|
|||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
impl<T: ?Sized> !DerefMut for &T {}
|
||||
|
||||
#[cfg(bootstrap)]
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
impl<T: ?Sized> Deref for &mut T {
|
||||
type Target = T;
|
||||
|
||||
fn deref(&self) -> &T {
|
||||
*self
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(not(bootstrap))]
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
impl<T: ?Sized> const Deref for &mut T {
|
||||
type Target = T;
|
||||
|
@ -282,7 +259,6 @@ impl<T: ?Sized> const Deref for &mut T {
|
|||
/// *x = 'b';
|
||||
/// assert_eq!('b', x.value);
|
||||
/// ```
|
||||
#[cfg(not(bootstrap))]
|
||||
#[lang = "deref_mut"]
|
||||
#[doc(alias = "*")]
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
|
@ -294,27 +270,6 @@ pub trait DerefMut: ~const Deref {
|
|||
fn deref_mut(&mut self) -> &mut Self::Target;
|
||||
}
|
||||
|
||||
/// Bootstrap
|
||||
#[lang = "deref_mut"]
|
||||
#[doc(alias = "*")]
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[cfg(bootstrap)]
|
||||
pub trait DerefMut: Deref {
|
||||
/// Mutably dereferences the value.
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[rustc_diagnostic_item = "deref_mut_method"]
|
||||
fn deref_mut(&mut self) -> &mut Self::Target;
|
||||
}
|
||||
|
||||
#[cfg(bootstrap)]
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
impl<T: ?Sized> DerefMut for &mut T {
|
||||
fn deref_mut(&mut self) -> &mut T {
|
||||
*self
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(not(bootstrap))]
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
impl<T: ?Sized> const DerefMut for &mut T {
|
||||
fn deref_mut(&mut self) -> &mut T {
|
||||
|
|
|
@ -203,7 +203,7 @@
|
|||
/// [nomicon]: ../../nomicon/phantom-data.html#an-exception-the-special-case-of-the-standard-library-and-its-unstable-may_dangle
|
||||
#[lang = "drop"]
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[cfg_attr(not(bootstrap), const_trait)]
|
||||
#[const_trait]
|
||||
pub trait Drop {
|
||||
/// Executes the destructor for this type.
|
||||
///
|
||||
|
|
|
@ -53,9 +53,8 @@ use crate::ptr::NonNull;
|
|||
///
|
||||
/// [`to_raw_parts`]: *const::to_raw_parts
|
||||
#[lang = "pointee_trait"]
|
||||
#[cfg_attr(bootstrap, rustc_deny_explicit_impl(implement_via_object = false))]
|
||||
#[cfg_attr(not(bootstrap), rustc_deny_explicit_impl)]
|
||||
#[cfg_attr(not(bootstrap), rustc_do_not_implement_via_object)]
|
||||
#[rustc_deny_explicit_impl]
|
||||
#[rustc_do_not_implement_via_object]
|
||||
pub trait Pointee {
|
||||
/// The type for metadata in pointers and references to `Self`.
|
||||
#[lang = "metadata_type"]
|
||||
|
|
|
@ -1556,7 +1556,6 @@ impl<T: ?Sized, U: ?Sized> DispatchFromDyn<NonNull<U>> for NonNull<T> where T: U
|
|||
unsafe impl<T: ?Sized> PinCoerceUnsized for NonNull<T> {}
|
||||
|
||||
#[unstable(feature = "pointer_like_trait", issue = "none")]
|
||||
#[cfg(not(bootstrap))]
|
||||
impl<T> core::marker::PointerLike for NonNull<T> {}
|
||||
|
||||
#[stable(feature = "nonnull", since = "1.25.0")]
|
||||
|
|
|
@ -304,7 +304,7 @@ fn test_const_nonnull_new() {
|
|||
#[test]
|
||||
#[cfg(unix)] // printf may not be available on other platforms
|
||||
#[allow(deprecated)] // For SipHasher
|
||||
#[cfg_attr(not(bootstrap), allow(unpredictable_function_pointer_comparisons))]
|
||||
#[allow(unpredictable_function_pointer_comparisons)]
|
||||
pub fn test_variadic_fnptr() {
|
||||
use core::ffi;
|
||||
use core::hash::{Hash, SipHasher};
|
||||
|
|
|
@ -12,8 +12,7 @@ pub use crate::marker::{Send, Sized, Sync, Unpin};
|
|||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[doc(no_inline)]
|
||||
pub use crate::ops::{Drop, Fn, FnMut, FnOnce};
|
||||
#[cfg_attr(bootstrap, unstable(feature = "async_closure", issue = "62290"))]
|
||||
#[cfg_attr(not(bootstrap), stable(feature = "async_closure", since = "1.85.0"))]
|
||||
#[stable(feature = "async_closure", since = "1.85.0")]
|
||||
#[doc(no_inline)]
|
||||
pub use crate::ops::{AsyncFn, AsyncFnMut, AsyncFnOnce};
|
||||
|
||||
|
|
|
@ -624,8 +624,6 @@ impl Builder<'_> {
|
|||
// get warnings about it being unexpected.
|
||||
hostflags.arg("-Zunstable-options");
|
||||
hostflags.arg("--check-cfg=cfg(bootstrap)");
|
||||
// #[cfg(bootstrap)] as we are transition `test` to userspace cfg
|
||||
hostflags.arg("--check-cfg=cfg(test)");
|
||||
|
||||
// FIXME: It might be better to use the same value for both `RUSTFLAGS` and `RUSTDOCFLAGS`,
|
||||
// but this breaks CI. At the very least, stage0 `rustdoc` needs `--cfg bootstrap`. See
|
||||
|
@ -1206,11 +1204,8 @@ impl Builder<'_> {
|
|||
// so that it'll be available when downstream consumers of std try to use it.
|
||||
rustflags.arg("-Zinline-mir-preserve-debug");
|
||||
|
||||
// FIXME: always pass this after the next `#[cfg(bootstrap)]` update.
|
||||
if compiler.stage != 0 {
|
||||
rustflags.arg("-Zmir_strip_debuginfo=locals-in-tiny-functions");
|
||||
}
|
||||
}
|
||||
|
||||
Cargo {
|
||||
command: cargo,
|
||||
|
|
|
@ -77,8 +77,6 @@ const LLD_FILE_NAMES: &[&str] = &["ld.lld", "ld64.lld", "lld-link", "wasm-ld"];
|
|||
#[allow(clippy::type_complexity)] // It's fine for hard-coded list and type is explained above.
|
||||
const EXTRA_CHECK_CFGS: &[(Option<Mode>, &str, Option<&[&'static str]>)] = &[
|
||||
(None, "bootstrap", None),
|
||||
// #[cfg(bootstrap)] to be removed when Cargo is updated
|
||||
(None, "test", None),
|
||||
(Some(Mode::Rustc), "llvm_enzyme", None),
|
||||
(Some(Mode::Codegen), "llvm_enzyme", None),
|
||||
(Some(Mode::ToolRustc), "llvm_enzyme", None),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue