Skip to content

Commit 6852fd4

Browse files
committed
update cfgs
1 parent be78dab commit 6852fd4

File tree

56 files changed

+107
-352
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+107
-352
lines changed

compiler/rustc_builtin_macros/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
#![allow(internal_features)]
66
#![allow(rustc::diagnostic_outside_of_impl)]
77
#![allow(rustc::untranslatable_diagnostic)]
8-
#![cfg_attr(not(bootstrap), feature(autodiff))]
98
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
109
#![doc(rust_logo)]
1110
#![feature(assert_matches)]
11+
#![feature(autodiff)]
1212
#![feature(box_patterns)]
1313
#![feature(decl_macro)]
1414
#![feature(if_let_guard)]

library/alloc/benches/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
#![feature(iter_next_chunk)]
55
#![feature(repr_simd)]
66
#![feature(slice_partition_dedup)]
7-
#![cfg_attr(bootstrap, feature(strict_provenance))]
8-
#![cfg_attr(not(bootstrap), feature(strict_provenance_lints))]
7+
#![feature(strict_provenance_lints)]
98
#![feature(test)]
109
#![deny(fuzzy_provenance_casts)]
1110

library/alloc/src/boxed.rs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,7 @@ use core::error::{self, Error};
191191
use core::fmt;
192192
use core::future::Future;
193193
use core::hash::{Hash, Hasher};
194-
#[cfg(not(bootstrap))]
195-
use core::marker::PointerLike;
196-
use core::marker::{Tuple, Unsize};
194+
use core::marker::{PointerLike, Tuple, Unsize};
197195
use core::mem::{self, SizedTypeProperties};
198196
use core::ops::{
199197
AsyncFn, AsyncFnMut, AsyncFnOnce, CoerceUnsized, Coroutine, CoroutineState, Deref, DerefMut,
@@ -227,7 +225,7 @@ pub use thin::ThinBox;
227225
#[fundamental]
228226
#[stable(feature = "rust1", since = "1.0.0")]
229227
#[rustc_insignificant_dtor]
230-
#[cfg_attr(not(bootstrap), doc(search_unbox))]
228+
#[doc(search_unbox)]
231229
// The declaration of the `Box` struct must be kept in sync with the
232230
// compiler or ICEs will happen.
233231
pub struct Box<
@@ -1502,7 +1500,7 @@ impl<T: ?Sized, A: Allocator> Box<T, A> {
15021500
/// [`as_ptr`]: Self::as_ptr
15031501
#[unstable(feature = "box_as_ptr", issue = "129090")]
15041502
#[rustc_never_returns_null_ptr]
1505-
#[cfg_attr(not(bootstrap), rustc_as_ptr)]
1503+
#[rustc_as_ptr]
15061504
#[inline]
15071505
pub fn as_mut_ptr(b: &mut Self) -> *mut T {
15081506
// This is a primitive deref, not going through `DerefMut`, and therefore not materializing
@@ -1551,7 +1549,7 @@ impl<T: ?Sized, A: Allocator> Box<T, A> {
15511549
/// [`as_ptr`]: Self::as_ptr
15521550
#[unstable(feature = "box_as_ptr", issue = "129090")]
15531551
#[rustc_never_returns_null_ptr]
1554-
#[cfg_attr(not(bootstrap), rustc_as_ptr)]
1552+
#[rustc_as_ptr]
15551553
#[inline]
15561554
pub fn as_ptr(b: &Self) -> *const T {
15571555
// This is a primitive deref, not going through `DerefMut`, and therefore not materializing
@@ -2134,6 +2132,5 @@ impl<E: Error> Error for Box<E> {
21342132
}
21352133
}
21362134

2137-
#[cfg(not(bootstrap))]
21382135
#[unstable(feature = "pointer_like_trait", issue = "none")]
21392136
impl<T> PointerLike for Box<T> {}

library/alloc/src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,6 @@
163163
//
164164
// Language features:
165165
// tidy-alphabetical-start
166-
#![cfg_attr(bootstrap, feature(strict_provenance))]
167-
#![cfg_attr(not(bootstrap), feature(strict_provenance_lints))]
168166
#![cfg_attr(not(test), feature(coroutine_trait))]
169167
#![cfg_attr(test, feature(panic_update_hook))]
170168
#![cfg_attr(test, feature(test))]
@@ -188,6 +186,7 @@
188186
#![feature(slice_internals)]
189187
#![feature(staged_api)]
190188
#![feature(stmt_expr_attributes)]
189+
#![feature(strict_provenance_lints)]
191190
#![feature(unboxed_closures)]
192191
#![feature(unsized_fn_params)]
193192
#![feature(with_negative_coherence)]

library/alloc/src/raw_vec.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ impl<T> RawVec<T, Global> {
103103
/// `RawVec` with capacity `usize::MAX`. Useful for implementing
104104
/// delayed allocation.
105105
#[must_use]
106-
#[cfg_attr(bootstrap, rustc_const_stable(feature = "raw_vec_internals_const", since = "1.81"))]
107106
pub const fn new() -> Self {
108107
Self::new_in(Global)
109108
}
@@ -179,7 +178,6 @@ impl<T, A: Allocator> RawVec<T, A> {
179178
/// Like `new`, but parameterized over the choice of allocator for
180179
/// the returned `RawVec`.
181180
#[inline]
182-
#[cfg_attr(bootstrap, rustc_const_stable(feature = "raw_vec_internals_const", since = "1.81"))]
183181
pub const fn new_in(alloc: A) -> Self {
184182
Self { inner: RawVecInner::new_in(alloc, align_of::<T>()), _marker: PhantomData }
185183
}
@@ -409,7 +407,6 @@ unsafe impl<#[may_dangle] T, A: Allocator> Drop for RawVec<T, A> {
409407

410408
impl<A: Allocator> RawVecInner<A> {
411409
#[inline]
412-
#[cfg_attr(bootstrap, rustc_const_stable(feature = "raw_vec_internals_const", since = "1.81"))]
413410
const fn new_in(alloc: A, align: usize) -> Self {
414411
let ptr = unsafe { core::mem::transmute(align) };
415412
// `cap: 0` means "unallocated". zero-sized types are ignored.

library/alloc/src/rc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ fn rc_inner_layout_for_value_layout(layout: Layout) -> Layout {
307307
/// `value.get_mut()`. This avoids conflicts with methods of the inner type `T`.
308308
///
309309
/// [get_mut]: Rc::get_mut
310-
#[cfg_attr(not(bootstrap), doc(search_unbox))]
310+
#[doc(search_unbox)]
311311
#[cfg_attr(not(test), rustc_diagnostic_item = "Rc")]
312312
#[stable(feature = "rust1", since = "1.0.0")]
313313
#[rustc_insignificant_dtor]

library/alloc/src/sync.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ macro_rules! acquire {
235235
/// counting in general.
236236
///
237237
/// [rc_examples]: crate::rc#examples
238-
#[cfg_attr(not(bootstrap), doc(search_unbox))]
238+
#[doc(search_unbox)]
239239
#[cfg_attr(not(test), rustc_diagnostic_item = "Arc")]
240240
#[stable(feature = "rust1", since = "1.0.0")]
241241
#[rustc_insignificant_dtor]

library/alloc/src/vec/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1662,7 +1662,7 @@ impl<T, A: Allocator> Vec<T, A> {
16621662
#[stable(feature = "vec_as_ptr", since = "1.37.0")]
16631663
#[rustc_const_unstable(feature = "const_vec_string_slice", issue = "129041")]
16641664
#[rustc_never_returns_null_ptr]
1665-
#[cfg_attr(not(bootstrap), rustc_as_ptr)]
1665+
#[rustc_as_ptr]
16661666
#[inline]
16671667
pub const fn as_ptr(&self) -> *const T {
16681668
// We shadow the slice method of the same name to avoid going through
@@ -1725,7 +1725,7 @@ impl<T, A: Allocator> Vec<T, A> {
17251725
#[stable(feature = "vec_as_ptr", since = "1.37.0")]
17261726
#[rustc_const_unstable(feature = "const_vec_string_slice", issue = "129041")]
17271727
#[rustc_never_returns_null_ptr]
1728-
#[cfg_attr(not(bootstrap), rustc_as_ptr)]
1728+
#[rustc_as_ptr]
17291729
#[inline]
17301730
pub const fn as_mut_ptr(&mut self) -> *mut T {
17311731
// We shadow the slice method of the same name to avoid going through

library/alloc/tests/boxed.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use core::mem::MaybeUninit;
44
use core::ptr::NonNull;
55

66
#[test]
7-
#[cfg_attr(not(bootstrap), expect(dangling_pointers_from_temporaries))]
7+
#[expect(dangling_pointers_from_temporaries)]
88
fn uninitialized_zero_size_box() {
99
assert_eq!(
1010
&*Box::<()>::new_uninit() as *const _,

library/alloc/tests/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,9 @@
3232
#![feature(panic_update_hook)]
3333
#![feature(pointer_is_aligned_to)]
3434
#![feature(thin_box)]
35-
#![cfg_attr(bootstrap, feature(strict_provenance))]
36-
#![cfg_attr(not(bootstrap), feature(strict_provenance_lints))]
3735
#![feature(drain_keep_rest)]
3836
#![feature(local_waker)]
37+
#![feature(strict_provenance_lints)]
3938
#![feature(vec_pop_if)]
4039
#![feature(unique_rc_arc)]
4140
#![feature(macro_metavar_expr_concat)]

0 commit comments

Comments
 (0)