Skip to content

Commit ea1066d

Browse files
Bump to latest beta
1 parent 787d323 commit ea1066d

File tree

18 files changed

+416
-434
lines changed

18 files changed

+416
-434
lines changed

library/alloc/src/rc.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1304,7 +1304,7 @@ impl<T: ?Sized, A: Allocator> Rc<T, A> {
13041304
/// assert_eq!(unsafe { &*x_ptr }, "hello");
13051305
/// ```
13061306
#[stable(feature = "rc_raw", since = "1.17.0")]
1307-
#[cfg_attr(not(bootstrap), rustc_never_returns_null_ptr)]
1307+
#[rustc_never_returns_null_ptr]
13081308
pub fn into_raw(this: Self) -> *const T {
13091309
let ptr = Self::as_ptr(&this);
13101310
mem::forget(this);
@@ -1328,7 +1328,7 @@ impl<T: ?Sized, A: Allocator> Rc<T, A> {
13281328
/// assert_eq!(unsafe { &*x_ptr }, "hello");
13291329
/// ```
13301330
#[stable(feature = "weak_into_raw", since = "1.45.0")]
1331-
#[cfg_attr(not(bootstrap), rustc_never_returns_null_ptr)]
1331+
#[rustc_never_returns_null_ptr]
13321332
pub fn as_ptr(this: &Self) -> *const T {
13331333
let ptr: *mut RcBox<T> = NonNull::as_ptr(this.ptr);
13341334

library/alloc/src/sync.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1454,7 +1454,7 @@ impl<T: ?Sized, A: Allocator> Arc<T, A> {
14541454
/// ```
14551455
#[must_use = "losing the pointer will leak memory"]
14561456
#[stable(feature = "rc_raw", since = "1.17.0")]
1457-
#[cfg_attr(not(bootstrap), rustc_never_returns_null_ptr)]
1457+
#[rustc_never_returns_null_ptr]
14581458
pub fn into_raw(this: Self) -> *const T {
14591459
let ptr = Self::as_ptr(&this);
14601460
mem::forget(this);
@@ -1479,7 +1479,7 @@ impl<T: ?Sized, A: Allocator> Arc<T, A> {
14791479
/// ```
14801480
#[must_use]
14811481
#[stable(feature = "rc_as_ptr", since = "1.45.0")]
1482-
#[cfg_attr(not(bootstrap), rustc_never_returns_null_ptr)]
1482+
#[rustc_never_returns_null_ptr]
14831483
pub fn as_ptr(this: &Self) -> *const T {
14841484
let ptr: *mut ArcInner<T> = NonNull::as_ptr(this.ptr);
14851485

library/alloc/src/vec/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1258,7 +1258,7 @@ impl<T, A: Allocator> Vec<T, A> {
12581258
/// [`as_mut_ptr`]: Vec::as_mut_ptr
12591259
/// [`as_ptr`]: Vec::as_ptr
12601260
#[stable(feature = "vec_as_ptr", since = "1.37.0")]
1261-
#[cfg_attr(not(bootstrap), rustc_never_returns_null_ptr)]
1261+
#[rustc_never_returns_null_ptr]
12621262
#[inline]
12631263
pub fn as_ptr(&self) -> *const T {
12641264
// We shadow the slice method of the same name to avoid going through
@@ -1318,7 +1318,7 @@ impl<T, A: Allocator> Vec<T, A> {
13181318
/// [`as_mut_ptr`]: Vec::as_mut_ptr
13191319
/// [`as_ptr`]: Vec::as_ptr
13201320
#[stable(feature = "vec_as_ptr", since = "1.37.0")]
1321-
#[cfg_attr(not(bootstrap), rustc_never_returns_null_ptr)]
1321+
#[rustc_never_returns_null_ptr]
13221322
#[inline]
13231323
pub fn as_mut_ptr(&mut self) -> *mut T {
13241324
// We shadow the slice method of the same name to avoid going through

library/core/src/cell.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,7 @@ impl<T: ?Sized> Cell<T> {
556556
#[inline]
557557
#[stable(feature = "cell_as_ptr", since = "1.12.0")]
558558
#[rustc_const_stable(feature = "const_cell_as_ptr", since = "1.32.0")]
559-
#[cfg_attr(not(bootstrap), rustc_never_returns_null_ptr)]
559+
#[rustc_never_returns_null_ptr]
560560
pub const fn as_ptr(&self) -> *mut T {
561561
self.value.get()
562562
}
@@ -1112,7 +1112,7 @@ impl<T: ?Sized> RefCell<T> {
11121112
/// ```
11131113
#[inline]
11141114
#[stable(feature = "cell_as_ptr", since = "1.12.0")]
1115-
#[cfg_attr(not(bootstrap), rustc_never_returns_null_ptr)]
1115+
#[rustc_never_returns_null_ptr]
11161116
pub fn as_ptr(&self) -> *mut T {
11171117
self.value.get()
11181118
}
@@ -2107,7 +2107,7 @@ impl<T: ?Sized> UnsafeCell<T> {
21072107
#[inline(always)]
21082108
#[stable(feature = "rust1", since = "1.0.0")]
21092109
#[rustc_const_stable(feature = "const_unsafecell_get", since = "1.32.0")]
2110-
#[cfg_attr(not(bootstrap), rustc_never_returns_null_ptr)]
2110+
#[rustc_never_returns_null_ptr]
21112111
pub const fn get(&self) -> *mut T {
21122112
// We can just cast the pointer from `UnsafeCell<T>` to `T` because of
21132113
// #[repr(transparent)]. This exploits std's special status, there is
@@ -2251,7 +2251,7 @@ impl<T: ?Sized> SyncUnsafeCell<T> {
22512251
/// when casting to `&mut T`, and ensure that there are no mutations
22522252
/// or mutable aliases going on when casting to `&T`
22532253
#[inline]
2254-
#[cfg_attr(not(bootstrap), rustc_never_returns_null_ptr)]
2254+
#[rustc_never_returns_null_ptr]
22552255
pub const fn get(&self) -> *mut T {
22562256
self.value.get()
22572257
}

library/core/src/cmp.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -299,8 +299,7 @@ pub trait Eq: PartialEq<Self> {
299299
//
300300
// This should never be implemented by hand.
301301
#[doc(hidden)]
302-
#[cfg_attr(bootstrap, no_coverage)] // rust-lang/rust#84605
303-
#[cfg_attr(not(bootstrap), coverage(off))] //
302+
#[coverage(off)]
304303
#[inline]
305304
#[stable(feature = "rust1", since = "1.0.0")]
306305
fn assert_receiver_is_total_eq(&self) {}
@@ -310,8 +309,7 @@ pub trait Eq: PartialEq<Self> {
310309
#[rustc_builtin_macro]
311310
#[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
312311
#[allow_internal_unstable(core_intrinsics, derive_eq, structural_match)]
313-
#[cfg_attr(bootstrap, allow_internal_unstable(no_coverage))]
314-
#[cfg_attr(not(bootstrap), allow_internal_unstable(coverage_attribute))]
312+
#[allow_internal_unstable(coverage_attribute)]
315313
pub macro Eq($item:item) {
316314
/* compiler built-in */
317315
}

library/core/src/ffi/c_str.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ impl CStr {
487487
#[must_use]
488488
#[stable(feature = "rust1", since = "1.0.0")]
489489
#[rustc_const_stable(feature = "const_str_as_ptr", since = "1.32.0")]
490-
#[cfg_attr(not(bootstrap), rustc_never_returns_null_ptr)]
490+
#[rustc_never_returns_null_ptr]
491491
pub const fn as_ptr(&self) -> *const c_char {
492492
self.inner.as_ptr()
493493
}

library/core/src/intrinsics/mir.rs

+3-7
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@
1212
//!
1313
//! Typical usage will look like this:
1414
//!
15-
#![cfg_attr(bootstrap, doc = "```rust,ignore")]
16-
#![cfg_attr(not(bootstrap), doc = "```rust")]
15+
//! ```rust
1716
//! #![feature(core_intrinsics, custom_mir)]
1817
//! #![allow(internal_features)]
1918
//!
@@ -63,8 +62,7 @@
6362
//!
6463
//! # Examples
6564
//!
66-
#![cfg_attr(bootstrap, doc = "```rust,ignore")]
67-
#![cfg_attr(not(bootstrap), doc = "```rust")]
65+
//! ```rust
6866
//! #![feature(core_intrinsics, custom_mir)]
6967
//! #![allow(internal_features)]
7068
//!
@@ -106,7 +104,6 @@
106104
//! }
107105
//!
108106
//! #[custom_mir(dialect = "runtime", phase = "optimized")]
109-
#![cfg_attr(bootstrap, doc = "#[cfg(any())]")] // disable the following function in doctests when `bootstrap` is set
110107
//! fn push_and_pop<T>(v: &mut Vec<T>, value: T) {
111108
//! mir!(
112109
//! let _unused;
@@ -319,8 +316,7 @@ define!(
319316
///
320317
/// # Examples
321318
///
322-
#[cfg_attr(bootstrap, doc = "```rust,ignore")]
323-
#[cfg_attr(not(bootstrap), doc = "```rust")]
319+
/// ```rust
324320
/// #![allow(internal_features)]
325321
/// #![feature(custom_mir, core_intrinsics)]
326322
///

library/core/src/lib.rs

+4-5
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,6 @@
110110
//
111111
// Library features:
112112
// tidy-alphabetical-start
113-
#![cfg_attr(bootstrap, feature(no_coverage))] // rust-lang/rust#84605
114-
#![cfg_attr(not(bootstrap), feature(coverage_attribute))] // rust-lang/rust#84605
115113
#![feature(char_indices_offset)]
116114
#![feature(const_align_of_val)]
117115
#![feature(const_align_of_val_raw)]
@@ -173,6 +171,7 @@
173171
#![feature(const_unsafecell_get_mut)]
174172
#![feature(const_waker)]
175173
#![feature(core_panic)]
174+
#![feature(coverage_attribute)]
176175
#![feature(duration_consts_float)]
177176
#![feature(internal_impls_macro)]
178177
#![feature(ip)]
@@ -196,7 +195,6 @@
196195
//
197196
// Language features:
198197
// tidy-alphabetical-start
199-
#![cfg_attr(not(bootstrap), feature(effects))]
200198
#![feature(abi_unadjusted)]
201199
#![feature(adt_const_params)]
202200
#![feature(allow_internal_unsafe)]
@@ -220,6 +218,7 @@
220218
#![feature(doc_cfg)]
221219
#![feature(doc_cfg_hide)]
222220
#![feature(doc_notable_trait)]
221+
#![feature(effects)]
223222
#![feature(exhaustive_patterns)]
224223
#![feature(extern_types)]
225224
#![feature(fundamental)]
@@ -412,13 +411,13 @@ pub mod primitive;
412411
dead_code,
413412
unused_imports,
414413
unsafe_op_in_unsafe_fn,
415-
ambiguous_glob_reexports
414+
ambiguous_glob_reexports,
415+
deprecated_in_future
416416
)]
417417
#[allow(rustdoc::bare_urls)]
418418
// FIXME: This annotation should be moved into rust-lang/stdarch after clashing_extern_declarations is
419419
// merged. It currently cannot because bootstrap fails as the lint hasn't been defined yet.
420420
#[allow(clashing_extern_declarations)]
421-
#[cfg_attr(bootstrap, allow(deprecated_in_future))]
422421
#[unstable(feature = "stdsimd", issue = "48556")]
423422
mod core_arch;
424423

library/core/src/num/saturating.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,7 @@ use crate::ops::{Sub, SubAssign};
3535
#[derive(PartialEq, Eq, PartialOrd, Ord, Clone, Copy, Default, Hash)]
3636
#[repr(transparent)]
3737
#[rustc_diagnostic_item = "Saturating"]
38-
pub struct Saturating<T>(
39-
#[stable(feature = "saturating_int_impl", since = "1.74.0")] pub T,
40-
);
38+
pub struct Saturating<T>(#[stable(feature = "saturating_int_impl", since = "1.74.0")] pub T);
4139

4240
#[stable(feature = "saturating_int_impl", since = "1.74.0")]
4341
impl<T: fmt::Debug> fmt::Debug for Saturating<T> {

library/core/src/panicking.rs

-1
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,6 @@ fn panic_cannot_unwind() -> ! {
229229
/// pass to `panic_nounwind`.
230230
/// This function is called directly by the codegen backend, and must not have
231231
/// any extra arguments (including those synthesized by track_caller).
232-
#[cfg(not(bootstrap))]
233232
#[cfg_attr(not(feature = "panic_immediate_abort"), inline(never), cold)]
234233
#[cfg_attr(feature = "panic_immediate_abort", inline)]
235234
#[lang = "panic_in_cleanup"] // needed by codegen for panic in nounwind function

library/core/src/ptr/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -698,7 +698,7 @@ where
698698
#[inline(always)]
699699
#[must_use]
700700
#[unstable(feature = "ptr_from_ref", issue = "106116")]
701-
#[cfg_attr(not(bootstrap), rustc_never_returns_null_ptr)]
701+
#[rustc_never_returns_null_ptr]
702702
#[rustc_diagnostic_item = "ptr_from_ref"]
703703
pub const fn from_ref<T: ?Sized>(r: &T) -> *const T {
704704
r
@@ -711,7 +711,7 @@ pub const fn from_ref<T: ?Sized>(r: &T) -> *const T {
711711
#[inline(always)]
712712
#[must_use]
713713
#[unstable(feature = "ptr_from_ref", issue = "106116")]
714-
#[cfg_attr(not(bootstrap), rustc_never_returns_null_ptr)]
714+
#[rustc_never_returns_null_ptr]
715715
pub const fn from_mut<T: ?Sized>(r: &mut T) -> *mut T {
716716
r
717717
}

library/core/src/ptr/non_null.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ impl<T: ?Sized> NonNull<T> {
338338
/// ```
339339
#[stable(feature = "nonnull", since = "1.25.0")]
340340
#[rustc_const_stable(feature = "const_nonnull_as_ptr", since = "1.32.0")]
341-
#[cfg_attr(not(bootstrap), rustc_never_returns_null_ptr)]
341+
#[rustc_never_returns_null_ptr]
342342
#[must_use]
343343
#[inline(always)]
344344
pub const fn as_ptr(self) -> *mut T {
@@ -598,7 +598,7 @@ impl<T> NonNull<[T]> {
598598
#[must_use]
599599
#[unstable(feature = "slice_ptr_get", issue = "74265")]
600600
#[rustc_const_unstable(feature = "slice_ptr_get", issue = "74265")]
601-
#[cfg_attr(not(bootstrap), rustc_never_returns_null_ptr)]
601+
#[rustc_never_returns_null_ptr]
602602
pub const fn as_mut_ptr(self) -> *mut T {
603603
self.as_non_null_ptr().as_ptr()
604604
}

library/core/src/slice/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -730,7 +730,7 @@ impl<T> [T] {
730730
/// [`as_mut_ptr`]: slice::as_mut_ptr
731731
#[stable(feature = "rust1", since = "1.0.0")]
732732
#[rustc_const_stable(feature = "const_slice_as_ptr", since = "1.32.0")]
733-
#[cfg_attr(not(bootstrap), rustc_never_returns_null_ptr)]
733+
#[rustc_never_returns_null_ptr]
734734
#[inline(always)]
735735
#[must_use]
736736
pub const fn as_ptr(&self) -> *const T {
@@ -761,7 +761,7 @@ impl<T> [T] {
761761
#[stable(feature = "rust1", since = "1.0.0")]
762762
#[rustc_const_stable(feature = "const_ptr_offset", since = "1.61.0")]
763763
#[rustc_allow_const_fn_unstable(const_mut_refs)]
764-
#[cfg_attr(not(bootstrap), rustc_never_returns_null_ptr)]
764+
#[rustc_never_returns_null_ptr]
765765
#[inline(always)]
766766
#[must_use]
767767
pub const fn as_mut_ptr(&mut self) -> *mut T {

library/core/src/str/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ impl str {
386386
/// ```
387387
#[stable(feature = "rust1", since = "1.0.0")]
388388
#[rustc_const_stable(feature = "rustc_str_as_ptr", since = "1.32.0")]
389-
#[cfg_attr(not(bootstrap), rustc_never_returns_null_ptr)]
389+
#[rustc_never_returns_null_ptr]
390390
#[must_use]
391391
#[inline(always)]
392392
pub const fn as_ptr(&self) -> *const u8 {
@@ -402,7 +402,7 @@ impl str {
402402
/// It is your responsibility to make sure that the string slice only gets
403403
/// modified in a way that it remains valid UTF-8.
404404
#[stable(feature = "str_as_mut_ptr", since = "1.36.0")]
405-
#[cfg_attr(not(bootstrap), rustc_never_returns_null_ptr)]
405+
#[rustc_never_returns_null_ptr]
406406
#[must_use]
407407
#[inline(always)]
408408
pub fn as_mut_ptr(&mut self) -> *mut u8 {

library/core/src/sync/atomic.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1018,7 +1018,7 @@ impl AtomicBool {
10181018
#[inline]
10191019
#[stable(feature = "atomic_as_ptr", since = "1.70.0")]
10201020
#[rustc_const_stable(feature = "atomic_as_ptr", since = "1.70.0")]
1021-
#[cfg_attr(not(bootstrap), rustc_never_returns_null_ptr)]
1021+
#[rustc_never_returns_null_ptr]
10221022
pub const fn as_ptr(&self) -> *mut bool {
10231023
self.v.get().cast()
10241024
}
@@ -1954,7 +1954,7 @@ impl<T> AtomicPtr<T> {
19541954
#[inline]
19551955
#[stable(feature = "atomic_as_ptr", since = "1.70.0")]
19561956
#[rustc_const_stable(feature = "atomic_as_ptr", since = "1.70.0")]
1957-
#[cfg_attr(not(bootstrap), rustc_never_returns_null_ptr)]
1957+
#[rustc_never_returns_null_ptr]
19581958
pub const fn as_ptr(&self) -> *mut *mut T {
19591959
self.p.get()
19601960
}
@@ -2893,7 +2893,7 @@ macro_rules! atomic_int {
28932893
#[inline]
28942894
#[stable(feature = "atomic_as_ptr", since = "1.70.0")]
28952895
#[rustc_const_stable(feature = "atomic_as_ptr", since = "1.70.0")]
2896-
#[cfg_attr(not(bootstrap), rustc_never_returns_null_ptr)]
2896+
#[rustc_never_returns_null_ptr]
28972897
pub const fn as_ptr(&self) -> *mut $int_type {
28982898
self.v.get()
28992899
}

src/bootstrap/lib.rs

+2-11
Original file line numberDiff line numberDiff line change
@@ -138,18 +138,9 @@ const EXTRA_CHECK_CFGS: &[(Option<Mode>, &str, Option<&[&'static str]>)] = &[
138138
(Some(Mode::Std), "freebsd13", None),
139139
(Some(Mode::Std), "backtrace_in_libstd", None),
140140
/* Extra values not defined in the built-in targets yet, but used in std */
141-
// #[cfg(bootstrap)]
142-
(Some(Mode::Std), "target_vendor", Some(&["unikraft"])),
143141
(Some(Mode::Std), "target_env", Some(&["libnx"])),
144-
// #[cfg(bootstrap)] hurd
145-
(Some(Mode::Std), "target_os", Some(&["teeos", "hurd"])),
146-
(Some(Mode::Rustc), "target_os", Some(&["hurd"])),
147-
// #[cfg(bootstrap)] mips32r6, mips64r6
148-
(
149-
Some(Mode::Std),
150-
"target_arch",
151-
Some(&["asmjs", "spirv", "nvptx", "xtensa", "mips32r6", "mips64r6", "csky"]),
152-
),
142+
// (Some(Mode::Std), "target_os", Some(&[])),
143+
(Some(Mode::Std), "target_arch", Some(&["asmjs", "spirv", "nvptx", "xtensa"])),
153144
/* Extra names used by dependencies */
154145
// FIXME: Used by serde_json, but we should not be triggering on external dependencies.
155146
(Some(Mode::Rustc), "no_btreemap_remove_entry", None),

0 commit comments

Comments
 (0)