Skip to content

Commit

Permalink
Auto merge of #116407 - Mark-Simulacrum:bootstrap-bump, r=onur-ozkan
Browse files Browse the repository at this point in the history
  • Loading branch information
bors committed Oct 14, 2023
2 parents 2a7c2df + ea1066d commit 39acbed
Show file tree
Hide file tree
Showing 31 changed files with 529 additions and 547 deletions.
4 changes: 2 additions & 2 deletions compiler/rustc_feature/src/accepted.rs
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ declare_features! (
/// + `impl Debug for Foo<'_>`
(accepted, impl_header_lifetime_elision, "1.31.0", Some(15872), None),
/// Allows referencing `Self` and projections in impl-trait.
(accepted, impl_trait_projections, "CURRENT_RUSTC_VERSION", Some(103532), None),
(accepted, impl_trait_projections, "1.74.0", Some(103532), None),
/// Allows using `a..=b` and `..=b` as inclusive range syntaxes.
(accepted, inclusive_range_syntax, "1.26.0", Some(28237), None),
/// Allows inferring outlives requirements (RFC 2093).
Expand Down Expand Up @@ -270,7 +270,7 @@ declare_features! (
/// Allows the use of or-patterns (e.g., `0 | 1`).
(accepted, or_patterns, "1.53.0", Some(54883), None),
/// Allows using `+bundle,+whole-archive` link modifiers with native libs.
(accepted, packed_bundled_libs, "CURRENT_RUSTC_VERSION", Some(108081), None),
(accepted, packed_bundled_libs, "1.74.0", Some(108081), None),
/// Allows annotating functions conforming to `fn(&PanicInfo) -> !` with `#[panic_handler]`.
/// This defines the behavior of panics.
(accepted, panic_handler, "1.30.0", Some(44489), None),
Expand Down
6 changes: 3 additions & 3 deletions compiler/rustc_feature/src/active.rs
Original file line number Diff line number Diff line change
Expand Up @@ -413,9 +413,9 @@ declare_features! (
(active, const_try, "1.56.0", Some(74935), None),
/// Allows function attribute `#[coverage(on/off)]`, to control coverage
/// instrumentation of that function.
(active, coverage_attribute, "CURRENT_RUSTC_VERSION", Some(84605), None),
(active, coverage_attribute, "1.74.0", Some(84605), None),
/// Allows users to provide classes for fenced code block using `class:classname`.
(active, custom_code_classes_in_docs, "CURRENT_RUSTC_VERSION", Some(79483), None),
(active, custom_code_classes_in_docs, "1.74.0", Some(79483), None),
/// Allows non-builtin attributes in inner attribute position.
(active, custom_inner_attributes, "1.30.0", Some(54726), None),
/// Allows custom test frameworks with `#![test_runner]` and `#[test_case]`.
Expand Down Expand Up @@ -596,7 +596,7 @@ declare_features! (
/// Enables rustc to generate code that instructs libstd to NOT ignore SIGPIPE.
(active, unix_sigpipe, "1.65.0", Some(97889), None),
/// Allows unnamed fields of struct and union type
(incomplete, unnamed_fields, "CURRENT_RUSTC_VERSION", Some(49804), None),
(incomplete, unnamed_fields, "1.74.0", Some(49804), None),
/// Allows unsized fn parameters.
(active, unsized_fn_params, "1.49.0", Some(48055), None),
/// Allows unsized rvalues at arguments and parameters.
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_feature/src/removed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ declare_features! (
(removed, negate_unsigned, "1.0.0", Some(29645), None, None),
/// Allows `#[no_coverage]` on functions.
/// The feature was renamed to `coverage_attribute` and the attribute to `#[coverage(on|off)]`
(removed, no_coverage, "CURRENT_RUSTC_VERSION", Some(84605), None, Some("renamed to `coverage_attribute`")),
(removed, no_coverage, "1.74.0", Some(84605), None, Some("renamed to `coverage_attribute`")),
/// Allows `#[no_debug]`.
(removed, no_debug, "1.43.0", Some(29721), None, Some("removed due to lack of demand")),
/// Note: this feature was previously recorded in a separate
Expand Down
6 changes: 3 additions & 3 deletions library/alloc/src/rc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1304,7 +1304,7 @@ impl<T: ?Sized, A: Allocator> Rc<T, A> {
/// assert_eq!(unsafe { &*x_ptr }, "hello");
/// ```
#[stable(feature = "rc_raw", since = "1.17.0")]
#[cfg_attr(not(bootstrap), rustc_never_returns_null_ptr)]
#[rustc_never_returns_null_ptr]
pub fn into_raw(this: Self) -> *const T {
let ptr = Self::as_ptr(&this);
mem::forget(this);
Expand All @@ -1328,7 +1328,7 @@ impl<T: ?Sized, A: Allocator> Rc<T, A> {
/// assert_eq!(unsafe { &*x_ptr }, "hello");
/// ```
#[stable(feature = "weak_into_raw", since = "1.45.0")]
#[cfg_attr(not(bootstrap), rustc_never_returns_null_ptr)]
#[rustc_never_returns_null_ptr]
pub fn as_ptr(this: &Self) -> *const T {
let ptr: *mut RcBox<T> = NonNull::as_ptr(this.ptr);

Expand Down Expand Up @@ -2409,7 +2409,7 @@ impl<T> From<T> for Rc<T> {
}

#[cfg(not(no_global_oom_handling))]
#[stable(feature = "shared_from_array", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "shared_from_array", since = "1.74.0")]
impl<T, const N: usize> From<[T; N]> for Rc<[T]> {
/// Converts a [`[T; N]`](prim@array) into an `Rc<[T]>`.
///
Expand Down
6 changes: 3 additions & 3 deletions library/alloc/src/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1455,7 +1455,7 @@ impl<T: ?Sized, A: Allocator> Arc<T, A> {
/// ```
#[must_use = "losing the pointer will leak memory"]
#[stable(feature = "rc_raw", since = "1.17.0")]
#[cfg_attr(not(bootstrap), rustc_never_returns_null_ptr)]
#[rustc_never_returns_null_ptr]
pub fn into_raw(this: Self) -> *const T {
let ptr = Self::as_ptr(&this);
mem::forget(this);
Expand All @@ -1480,7 +1480,7 @@ impl<T: ?Sized, A: Allocator> Arc<T, A> {
/// ```
#[must_use]
#[stable(feature = "rc_as_ptr", since = "1.45.0")]
#[cfg_attr(not(bootstrap), rustc_never_returns_null_ptr)]
#[rustc_never_returns_null_ptr]
pub fn as_ptr(this: &Self) -> *const T {
let ptr: *mut ArcInner<T> = NonNull::as_ptr(this.ptr);

Expand Down Expand Up @@ -3271,7 +3271,7 @@ impl<T> From<T> for Arc<T> {
}

#[cfg(not(no_global_oom_handling))]
#[stable(feature = "shared_from_array", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "shared_from_array", since = "1.74.0")]
impl<T, const N: usize> From<[T; N]> for Arc<[T]> {
/// Converts a [`[T; N]`](prim@array) into an `Arc<[T]>`.
///
Expand Down
8 changes: 4 additions & 4 deletions library/alloc/src/vec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1258,7 +1258,7 @@ impl<T, A: Allocator> Vec<T, A> {
/// [`as_mut_ptr`]: Vec::as_mut_ptr
/// [`as_ptr`]: Vec::as_ptr
#[stable(feature = "vec_as_ptr", since = "1.37.0")]
#[cfg_attr(not(bootstrap), rustc_never_returns_null_ptr)]
#[rustc_never_returns_null_ptr]
#[inline]
pub fn as_ptr(&self) -> *const T {
// We shadow the slice method of the same name to avoid going through
Expand Down Expand Up @@ -1318,7 +1318,7 @@ impl<T, A: Allocator> Vec<T, A> {
/// [`as_mut_ptr`]: Vec::as_mut_ptr
/// [`as_ptr`]: Vec::as_ptr
#[stable(feature = "vec_as_ptr", since = "1.37.0")]
#[cfg_attr(not(bootstrap), rustc_never_returns_null_ptr)]
#[rustc_never_returns_null_ptr]
#[inline]
pub fn as_mut_ptr(&mut self) -> *mut T {
// We shadow the slice method of the same name to avoid going through
Expand Down Expand Up @@ -3155,7 +3155,7 @@ impl<T: Clone> From<&mut [T]> for Vec<T> {
}

#[cfg(not(no_global_oom_handling))]
#[stable(feature = "vec_from_array_ref", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "vec_from_array_ref", since = "1.74.0")]
impl<T: Clone, const N: usize> From<&[T; N]> for Vec<T> {
/// Allocate a `Vec<T>` and fill it by cloning `s`'s items.
///
Expand All @@ -3170,7 +3170,7 @@ impl<T: Clone, const N: usize> From<&[T; N]> for Vec<T> {
}

#[cfg(not(no_global_oom_handling))]
#[stable(feature = "vec_from_array_ref", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "vec_from_array_ref", since = "1.74.0")]
impl<T: Clone, const N: usize> From<&mut [T; N]> for Vec<T> {
/// Allocate a `Vec<T>` and fill it by cloning `s`'s items.
///
Expand Down
8 changes: 4 additions & 4 deletions library/core/src/cell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ impl<T: ?Sized> Cell<T> {
#[inline]
#[stable(feature = "cell_as_ptr", since = "1.12.0")]
#[rustc_const_stable(feature = "const_cell_as_ptr", since = "1.32.0")]
#[cfg_attr(not(bootstrap), rustc_never_returns_null_ptr)]
#[rustc_never_returns_null_ptr]
pub const fn as_ptr(&self) -> *mut T {
self.value.get()
}
Expand Down Expand Up @@ -1112,7 +1112,7 @@ impl<T: ?Sized> RefCell<T> {
/// ```
#[inline]
#[stable(feature = "cell_as_ptr", since = "1.12.0")]
#[cfg_attr(not(bootstrap), rustc_never_returns_null_ptr)]
#[rustc_never_returns_null_ptr]
pub fn as_ptr(&self) -> *mut T {
self.value.get()
}
Expand Down Expand Up @@ -2109,7 +2109,7 @@ impl<T: ?Sized> UnsafeCell<T> {
#[inline(always)]
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_stable(feature = "const_unsafecell_get", since = "1.32.0")]
#[cfg_attr(not(bootstrap), rustc_never_returns_null_ptr)]
#[rustc_never_returns_null_ptr]
pub const fn get(&self) -> *mut T {
// We can just cast the pointer from `UnsafeCell<T>` to `T` because of
// #[repr(transparent)]. This exploits std's special status, there is
Expand Down Expand Up @@ -2253,7 +2253,7 @@ impl<T: ?Sized> SyncUnsafeCell<T> {
/// when casting to `&mut T`, and ensure that there are no mutations
/// or mutable aliases going on when casting to `&T`
#[inline]
#[cfg_attr(not(bootstrap), rustc_never_returns_null_ptr)]
#[rustc_never_returns_null_ptr]
pub const fn get(&self) -> *mut T {
self.value.get()
}
Expand Down
2 changes: 1 addition & 1 deletion library/core/src/char/convert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ impl TryFrom<char> for u8 {
/// failing if the code point is greater than U+FFFF.
///
/// This corresponds to the UCS-2 encoding, as specified in ISO/IEC 10646:2003.
#[stable(feature = "u16_from_char", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "u16_from_char", since = "1.74.0")]
impl TryFrom<char> for u16 {
type Error = TryFromCharError;

Expand Down
6 changes: 2 additions & 4 deletions library/core/src/cmp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -311,8 +311,7 @@ pub trait Eq: PartialEq<Self> {
//
// This should never be implemented by hand.
#[doc(hidden)]
#[cfg_attr(bootstrap, no_coverage)] // rust-lang/rust#84605
#[cfg_attr(not(bootstrap), coverage(off))] //
#[coverage(off)]
#[inline]
#[stable(feature = "rust1", since = "1.0.0")]
fn assert_receiver_is_total_eq(&self) {}
Expand All @@ -322,8 +321,7 @@ pub trait Eq: PartialEq<Self> {
#[rustc_builtin_macro]
#[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
#[allow_internal_unstable(core_intrinsics, derive_eq, structural_match)]
#[cfg_attr(bootstrap, allow_internal_unstable(no_coverage))]
#[cfg_attr(not(bootstrap), allow_internal_unstable(coverage_attribute))]
#[allow_internal_unstable(coverage_attribute)]
pub macro Eq($item:item) {
/* compiler built-in */
}
Expand Down
2 changes: 1 addition & 1 deletion library/core/src/ffi/c_str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ impl CStr {
#[must_use]
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_stable(feature = "const_str_as_ptr", since = "1.32.0")]
#[cfg_attr(not(bootstrap), rustc_never_returns_null_ptr)]
#[rustc_never_returns_null_ptr]
pub const fn as_ptr(&self) -> *const c_char {
self.inner.as_ptr()
}
Expand Down
10 changes: 3 additions & 7 deletions library/core/src/intrinsics/mir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
//!
//! Typical usage will look like this:
//!
#![cfg_attr(bootstrap, doc = "```rust,ignore")]
#![cfg_attr(not(bootstrap), doc = "```rust")]
//! ```rust
//! #![feature(core_intrinsics, custom_mir)]
//! #![allow(internal_features)]
//!
Expand Down Expand Up @@ -63,8 +62,7 @@
//!
//! # Examples
//!
#![cfg_attr(bootstrap, doc = "```rust,ignore")]
#![cfg_attr(not(bootstrap), doc = "```rust")]
//! ```rust
//! #![feature(core_intrinsics, custom_mir)]
//! #![allow(internal_features)]
//!
Expand Down Expand Up @@ -106,7 +104,6 @@
//! }
//!
//! #[custom_mir(dialect = "runtime", phase = "optimized")]
#![cfg_attr(bootstrap, doc = "#[cfg(any())]")] // disable the following function in doctests when `bootstrap` is set
//! fn push_and_pop<T>(v: &mut Vec<T>, value: T) {
//! mir!(
//! let _unused;
Expand Down Expand Up @@ -319,8 +316,7 @@ define!(
///
/// # Examples
///
#[cfg_attr(bootstrap, doc = "```rust,ignore")]
#[cfg_attr(not(bootstrap), doc = "```rust")]
/// ```rust
/// #![allow(internal_features)]
/// #![feature(custom_mir, core_intrinsics)]
///
Expand Down
9 changes: 4 additions & 5 deletions library/core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,6 @@
//
// Library features:
// tidy-alphabetical-start
#![cfg_attr(bootstrap, feature(no_coverage))] // rust-lang/rust#84605
#![cfg_attr(not(bootstrap), feature(coverage_attribute))] // rust-lang/rust#84605
#![feature(char_indices_offset)]
#![feature(const_align_of_val)]
#![feature(const_align_of_val_raw)]
Expand Down Expand Up @@ -174,6 +172,7 @@
#![feature(const_unsafecell_get_mut)]
#![feature(const_waker)]
#![feature(core_panic)]
#![feature(coverage_attribute)]
#![feature(duration_consts_float)]
#![feature(internal_impls_macro)]
#![feature(ip)]
Expand All @@ -197,7 +196,6 @@
//
// Language features:
// tidy-alphabetical-start
#![cfg_attr(not(bootstrap), feature(effects))]
#![feature(abi_unadjusted)]
#![feature(adt_const_params)]
#![feature(allow_internal_unsafe)]
Expand All @@ -221,6 +219,7 @@
#![feature(doc_cfg)]
#![feature(doc_cfg_hide)]
#![feature(doc_notable_trait)]
#![feature(effects)]
#![feature(exhaustive_patterns)]
#![feature(extern_types)]
#![feature(fundamental)]
Expand Down Expand Up @@ -414,13 +413,13 @@ pub mod primitive;
dead_code,
unused_imports,
unsafe_op_in_unsafe_fn,
ambiguous_glob_reexports
ambiguous_glob_reexports,
deprecated_in_future
)]
#[allow(rustdoc::bare_urls)]
// FIXME: This annotation should be moved into rust-lang/stdarch after clashing_extern_declarations is
// merged. It currently cannot because bootstrap fails as the lint hasn't been defined yet.
#[allow(clashing_extern_declarations)]
#[cfg_attr(bootstrap, allow(deprecated_in_future))]
#[unstable(feature = "stdsimd", issue = "48556")]
mod core_arch;

Expand Down
2 changes: 1 addition & 1 deletion library/core/src/mem/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1051,7 +1051,7 @@ pub const fn copy<T: Copy>(x: &T) -> T {
#[inline]
#[must_use]
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_stable(feature = "const_transmute_copy", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "const_transmute_copy", since = "1.74.0")]
pub const unsafe fn transmute_copy<Src, Dst>(src: &Src) -> Dst {
assert!(
size_of::<Src>() >= size_of::<Dst>(),
Expand Down
2 changes: 1 addition & 1 deletion library/core/src/num/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ mod nonzero;
mod saturating;
mod wrapping;

#[stable(feature = "saturating_int_impl", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "saturating_int_impl", since = "1.74.0")]
pub use saturating::Saturating;
#[stable(feature = "rust1", since = "1.0.0")]
pub use wrapping::Wrapping;
Expand Down

0 comments on commit 39acbed

Please sign in to comment.