Skip to content

[beta] 1.79 promotion #124476

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions compiler/rustc_data_structures/src/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ use std::collections::HashMap;
use std::hash::{BuildHasher, Hash};

mod lock;
#[doc(no_inline)]
pub use lock::{Lock, LockGuard, Mode};

mod worker_local;
Expand Down Expand Up @@ -199,10 +200,15 @@ cfg_match! {

pub use std::rc::Rc as Lrc;
pub use std::rc::Weak as Weak;
#[doc(no_inline)]
pub use std::cell::Ref as ReadGuard;
#[doc(no_inline)]
pub use std::cell::Ref as MappedReadGuard;
#[doc(no_inline)]
pub use std::cell::RefMut as WriteGuard;
#[doc(no_inline)]
pub use std::cell::RefMut as MappedWriteGuard;
#[doc(no_inline)]
pub use std::cell::RefMut as MappedLockGuard;

pub use std::cell::OnceCell as OnceLock;
Expand Down
10 changes: 5 additions & 5 deletions compiler/rustc_feature/src/accepted.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ declare_features! (
/// Allows the definition of associated constants in `trait` or `impl` blocks.
(accepted, associated_consts, "1.20.0", Some(29646)),
/// Allows the user of associated type bounds.
(accepted, associated_type_bounds, "CURRENT_RUSTC_VERSION", Some(52662)),
(accepted, associated_type_bounds, "1.79.0", Some(52662)),
/// Allows using associated `type`s in `trait`s.
(accepted, associated_types, "1.0.0", None),
/// Allows free and inherent `async fn`s, `async` blocks, and `<expr>.await` expressions.
Expand Down Expand Up @@ -99,7 +99,7 @@ declare_features! (
/// Allows using the CMPXCHG16B target feature.
(accepted, cmpxchg16b_target_feature, "1.69.0", Some(44839)),
/// Allows use of the `#[collapse_debuginfo]` attribute.
(accepted, collapse_debuginfo, "CURRENT_RUSTC_VERSION", Some(100758)),
(accepted, collapse_debuginfo, "1.79.0", Some(100758)),
/// Allows usage of the `compile_error!` macro.
(accepted, compile_error, "1.20.0", Some(40872)),
/// Allows `impl Trait` in function return types.
Expand Down Expand Up @@ -208,13 +208,13 @@ declare_features! (
/// Allows referencing `Self` and projections in impl-trait.
(accepted, impl_trait_projections, "1.74.0", Some(103532)),
/// Allows using imported `main` function
(accepted, imported_main, "CURRENT_RUSTC_VERSION", Some(28937)),
(accepted, imported_main, "1.79.0", Some(28937)),
/// Allows using `a..=b` and `..=b` as inclusive range syntaxes.
(accepted, inclusive_range_syntax, "1.26.0", Some(28237)),
/// Allows inferring outlives requirements (RFC 2093).
(accepted, infer_outlives_requirements, "1.30.0", Some(44493)),
/// Allow anonymous constants from an inline `const` block
(accepted, inline_const, "CURRENT_RUSTC_VERSION", Some(76001)),
(accepted, inline_const, "1.79.0", Some(76001)),
/// Allows irrefutable patterns in `if let` and `while let` statements (RFC 2086).
(accepted, irrefutable_let_patterns, "1.33.0", Some(44495)),
/// Allows `#[instruction_set(_)]` attribute.
Expand Down Expand Up @@ -360,7 +360,7 @@ declare_features! (
/// Allows macros to appear in the type position.
(accepted, type_macros, "1.13.0", Some(27245)),
/// Allows using type privacy lints (`private_interfaces`, `private_bounds`, `unnameable_types`).
(accepted, type_privacy_lints, "CURRENT_RUSTC_VERSION", Some(48054)),
(accepted, type_privacy_lints, "1.79.0", Some(48054)),
/// Allows `const _: TYPE = VALUE`.
(accepted, underscore_const_names, "1.37.0", Some(54912)),
/// Allows `use path as _;` and `extern crate c as _;`.
Expand Down
18 changes: 9 additions & 9 deletions compiler/rustc_feature/src/unstable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ declare_features! (
/// Set the maximum pattern complexity allowed (not limited by default).
(internal, pattern_complexity, "1.78.0", None),
/// Allows using pattern types.
(internal, pattern_types, "CURRENT_RUSTC_VERSION", Some(123646)),
(internal, pattern_types, "1.79.0", Some(123646)),
/// Allows using `#[prelude_import]` on glob `use` items.
(internal, prelude_import, "1.2.0", None),
/// Used to identify crates that contain the profiler runtime.
Expand Down Expand Up @@ -384,7 +384,7 @@ declare_features! (
/// Allows `cfg(target_thread_local)`.
(unstable, cfg_target_thread_local, "1.7.0", Some(29594)),
/// Allows the use of `#[cfg(ub_checks)` to check if UB checks are enabled.
(unstable, cfg_ub_checks, "CURRENT_RUSTC_VERSION", Some(123499)),
(unstable, cfg_ub_checks, "1.79.0", Some(123499)),
/// Allow conditional compilation depending on rust version
(unstable, cfg_version, "1.45.0", Some(64796)),
/// Allows to use the `#[cfi_encoding = ""]` attribute.
Expand Down Expand Up @@ -439,7 +439,7 @@ declare_features! (
/// Allows having using `suggestion` in the `#[deprecated]` attribute.
(unstable, deprecated_suggestion, "1.61.0", Some(94785)),
/// Allows deref patterns.
(incomplete, deref_patterns, "CURRENT_RUSTC_VERSION", Some(87121)),
(incomplete, deref_patterns, "1.79.0", Some(87121)),
/// Controls errors in trait implementations.
(unstable, do_not_recommend, "1.67.0", Some(51992)),
/// Tells rustdoc to automatically generate `#[doc(cfg(...))]`.
Expand Down Expand Up @@ -530,9 +530,9 @@ declare_features! (
/// Allows the `#[must_not_suspend]` attribute.
(unstable, must_not_suspend, "1.57.0", Some(83310)),
/// Make `mut` not reset the binding mode on edition >= 2024.
(incomplete, mut_preserve_binding_mode_2024, "CURRENT_RUSTC_VERSION", Some(123076)),
(incomplete, mut_preserve_binding_mode_2024, "1.79.0", Some(123076)),
/// Allows `mut ref` and `mut ref mut` identifier patterns.
(incomplete, mut_ref, "CURRENT_RUSTC_VERSION", Some(123076)),
(incomplete, mut_ref, "1.79.0", Some(123076)),
/// Allows using `#[naked]` on functions.
(unstable, naked_functions, "1.9.0", Some(90957)),
/// Allows specifying the as-needed link modifier
Expand Down Expand Up @@ -564,17 +564,17 @@ declare_features! (
/// Allows using `#[optimize(X)]`.
(unstable, optimize_attribute, "1.34.0", Some(54882)),
/// Allows postfix match `expr.match { ... }`
(unstable, postfix_match, "CURRENT_RUSTC_VERSION", Some(121618)),
(unstable, postfix_match, "1.79.0", Some(121618)),
/// Allows `use<'a, 'b, A, B>` in `impl use<...> Trait` for precise capture of generic args.
(incomplete, precise_capturing, "CURRENT_RUSTC_VERSION", Some(123432)),
(incomplete, precise_capturing, "1.79.0", Some(123432)),
/// Allows macro attributes on expressions, statements and non-inline modules.
(unstable, proc_macro_hygiene, "1.30.0", Some(54727)),
/// Allows `&raw const $place_expr` and `&raw mut $place_expr` expressions.
(unstable, raw_ref_op, "1.41.0", Some(64490)),
/// Makes `&` and `&mut` patterns eat only one layer of references in Rust 2024.
(incomplete, ref_pat_eat_one_layer_2024, "CURRENT_RUSTC_VERSION", Some(123076)),
(incomplete, ref_pat_eat_one_layer_2024, "1.79.0", Some(123076)),
/// Allows `&` and `&mut` patterns to consume match-ergonomics-inserted references.
(incomplete, ref_pat_everywhere, "CURRENT_RUSTC_VERSION", Some(123076)),
(incomplete, ref_pat_everywhere, "1.79.0", Some(123076)),
/// Allows using the `#[register_tool]` attribute.
(unstable, register_tool, "1.41.0", Some(66079)),
/// Allows the `#[repr(i128)]` attribute for enums.
Expand Down
2 changes: 1 addition & 1 deletion library/alloc/src/str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ pub use core::str::{RSplit, Split};
pub use core::str::{RSplitN, SplitN};
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::str::{RSplitTerminator, SplitTerminator};
#[stable(feature = "utf8_chunks", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "utf8_chunks", since = "1.79.0")]
pub use core::str::{Utf8Chunk, Utf8Chunks};

/// Note: `str` in `Concat<str>` is not meaningful here.
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 @@ -528,7 +528,7 @@ impl CStr {
#[inline]
#[must_use]
#[doc(alias("len", "strlen"))]
#[stable(feature = "cstr_count_bytes", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "cstr_count_bytes", since = "1.79.0")]
#[rustc_const_unstable(feature = "const_cstr_from_ptr", issue = "113219")]
pub const fn count_bytes(&self) -> usize {
self.inner.len() - 1
Expand Down
8 changes: 4 additions & 4 deletions library/core/src/intrinsics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1128,7 +1128,7 @@ extern "rust-intrinsic" {
/// any safety invariants.
///
/// Consider using [`core::panic::Location::caller`] instead.
#[rustc_const_stable(feature = "const_caller_location", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "const_caller_location", since = "1.79.0")]
#[rustc_safe_intrinsic]
#[rustc_nounwind]
pub fn caller_location() -> &'static crate::panic::Location<'static>;
Expand Down Expand Up @@ -2289,7 +2289,7 @@ extern "rust-intrinsic" {
///
/// The stable counterpart of this intrinsic is `unchecked_add` on the various
/// integer types, such as [`u16::unchecked_add`] and [`i64::unchecked_add`].
#[rustc_const_stable(feature = "unchecked_math", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "unchecked_math", since = "1.79.0")]
#[rustc_nounwind]
pub fn unchecked_add<T: Copy>(x: T, y: T) -> T;

Expand All @@ -2298,7 +2298,7 @@ extern "rust-intrinsic" {
///
/// The stable counterpart of this intrinsic is `unchecked_sub` on the various
/// integer types, such as [`u16::unchecked_sub`] and [`i64::unchecked_sub`].
#[rustc_const_stable(feature = "unchecked_math", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "unchecked_math", since = "1.79.0")]
#[rustc_nounwind]
pub fn unchecked_sub<T: Copy>(x: T, y: T) -> T;

Expand All @@ -2307,7 +2307,7 @@ extern "rust-intrinsic" {
///
/// The stable counterpart of this intrinsic is `unchecked_mul` on the various
/// integer types, such as [`u16::unchecked_mul`] and [`i64::unchecked_mul`].
#[rustc_const_stable(feature = "unchecked_math", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "unchecked_math", since = "1.79.0")]
#[rustc_nounwind]
pub fn unchecked_mul<T: Copy>(x: T, y: T) -> T;

Expand Down
2 changes: 1 addition & 1 deletion library/core/src/iter/traits/collect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ pub trait FromIterator<A>: Sized {
/// assert_eq!(lengths, [1, 1, 3, 1]);
/// # Ok(()) }
/// ```
#[stable(feature = "from_iterator_for_tuple", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "from_iterator_for_tuple", since = "1.79.0")]
impl<A, B, AE, BE> FromIterator<(AE, BE)> for (A, B)
where
A: Default + Extend<AE>,
Expand Down
12 changes: 6 additions & 6 deletions library/core/src/num/int_macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -481,8 +481,8 @@ macro_rules! int_impl {
/// [`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked
#[doc = concat!("[`checked_add`]: ", stringify!($SelfT), "::checked_add")]
#[doc = concat!("[`wrapping_add`]: ", stringify!($SelfT), "::wrapping_add")]
#[stable(feature = "unchecked_math", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "unchecked_math", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "unchecked_math", since = "1.79.0")]
#[rustc_const_stable(feature = "unchecked_math", since = "1.79.0")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline(always)]
Expand Down Expand Up @@ -623,8 +623,8 @@ macro_rules! int_impl {
/// [`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked
#[doc = concat!("[`checked_sub`]: ", stringify!($SelfT), "::checked_sub")]
#[doc = concat!("[`wrapping_sub`]: ", stringify!($SelfT), "::wrapping_sub")]
#[stable(feature = "unchecked_math", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "unchecked_math", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "unchecked_math", since = "1.79.0")]
#[rustc_const_stable(feature = "unchecked_math", since = "1.79.0")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline(always)]
Expand Down Expand Up @@ -765,8 +765,8 @@ macro_rules! int_impl {
/// [`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked
#[doc = concat!("[`checked_mul`]: ", stringify!($SelfT), "::checked_mul")]
#[doc = concat!("[`wrapping_mul`]: ", stringify!($SelfT), "::wrapping_mul")]
#[stable(feature = "unchecked_math", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "unchecked_math", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "unchecked_math", since = "1.79.0")]
#[rustc_const_stable(feature = "unchecked_math", since = "1.79.0")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline(always)]
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 @@ -67,7 +67,7 @@ pub use error::ParseIntError;
)]
pub use nonzero::ZeroablePrimitive;

#[stable(feature = "generic_nonzero", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "generic_nonzero", since = "1.79.0")]
pub use nonzero::NonZero;

#[stable(feature = "signed_nonzero", since = "1.34.0")]
Expand Down
6 changes: 3 additions & 3 deletions library/core/src/num/nonzero.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ impl_zeroable_primitive!(
///
/// assert_eq!(size_of::<Option<NonZero<u32>>>(), size_of::<u32>());
/// ```
#[stable(feature = "generic_nonzero", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "generic_nonzero", since = "1.79.0")]
#[repr(transparent)]
#[rustc_nonnull_optimization_guaranteed]
#[rustc_diagnostic_item = "NonZero"]
Expand Down Expand Up @@ -861,7 +861,7 @@ macro_rules! nonzero_integer_signedness_dependent_impls {
}
}

#[stable(feature = "nonzero_div_assign", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "nonzero_div_assign", since = "1.79.0")]
impl DivAssign<$Ty> for $Int {
/// This operation rounds towards zero,
/// truncating any fractional part of the exact result, and cannot panic.
Expand All @@ -884,7 +884,7 @@ macro_rules! nonzero_integer_signedness_dependent_impls {
}
}

#[stable(feature = "nonzero_div_assign", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "nonzero_div_assign", since = "1.79.0")]
impl RemAssign<$Ty> for $Int {
/// This operation satisfies `n % d == n - (n / d) * d`, and cannot panic.
#[inline]
Expand Down
12 changes: 6 additions & 6 deletions library/core/src/num/uint_macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -503,8 +503,8 @@ macro_rules! uint_impl {
/// [`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked
#[doc = concat!("[`checked_add`]: ", stringify!($SelfT), "::checked_add")]
#[doc = concat!("[`wrapping_add`]: ", stringify!($SelfT), "::wrapping_add")]
#[stable(feature = "unchecked_math", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "unchecked_math", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "unchecked_math", since = "1.79.0")]
#[rustc_const_stable(feature = "unchecked_math", since = "1.79.0")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline(always)]
Expand Down Expand Up @@ -660,8 +660,8 @@ macro_rules! uint_impl {
/// [`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked
#[doc = concat!("[`checked_sub`]: ", stringify!($SelfT), "::checked_sub")]
#[doc = concat!("[`wrapping_sub`]: ", stringify!($SelfT), "::wrapping_sub")]
#[stable(feature = "unchecked_math", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "unchecked_math", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "unchecked_math", since = "1.79.0")]
#[rustc_const_stable(feature = "unchecked_math", since = "1.79.0")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline(always)]
Expand Down Expand Up @@ -746,8 +746,8 @@ macro_rules! uint_impl {
/// [`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked
#[doc = concat!("[`checked_mul`]: ", stringify!($SelfT), "::checked_mul")]
#[doc = concat!("[`wrapping_mul`]: ", stringify!($SelfT), "::wrapping_mul")]
#[stable(feature = "unchecked_math", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "unchecked_math", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "unchecked_math", since = "1.79.0")]
#[rustc_const_stable(feature = "unchecked_math", since = "1.79.0")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline(always)]
Expand Down
8 changes: 4 additions & 4 deletions library/core/src/panic/location.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ impl<'a> Location<'a> {
/// ```
#[must_use]
#[stable(feature = "track_caller", since = "1.46.0")]
#[rustc_const_stable(feature = "const_caller_location", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "const_caller_location", since = "1.79.0")]
#[track_caller]
#[inline]
pub const fn caller() -> &'static Location<'static> {
Expand Down Expand Up @@ -123,7 +123,7 @@ impl<'a> Location<'a> {
/// ```
#[must_use]
#[stable(feature = "panic_hooks", since = "1.10.0")]
#[rustc_const_stable(feature = "const_location_fields", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "const_location_fields", since = "1.79.0")]
#[inline]
pub const fn file(&self) -> &str {
self.file
Expand All @@ -148,7 +148,7 @@ impl<'a> Location<'a> {
/// ```
#[must_use]
#[stable(feature = "panic_hooks", since = "1.10.0")]
#[rustc_const_stable(feature = "const_location_fields", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "const_location_fields", since = "1.79.0")]
#[inline]
pub const fn line(&self) -> u32 {
self.line
Expand All @@ -173,7 +173,7 @@ impl<'a> Location<'a> {
/// ```
#[must_use]
#[stable(feature = "panic_col", since = "1.25.0")]
#[rustc_const_stable(feature = "const_location_fields", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "const_location_fields", since = "1.79.0")]
#[inline]
pub const fn column(&self) -> u32 {
self.col
Expand Down
10 changes: 5 additions & 5 deletions library/core/src/ptr/const_ptr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1496,7 +1496,7 @@ impl<T: ?Sized> *const T {
/// [tracking issue]: https://github.com/rust-lang/rust/issues/104203
#[must_use]
#[inline]
#[stable(feature = "pointer_is_aligned", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "pointer_is_aligned", since = "1.79.0")]
#[rustc_const_unstable(feature = "const_pointer_is_aligned", issue = "104203")]
pub const fn is_aligned(self) -> bool
where
Expand Down Expand Up @@ -1653,8 +1653,8 @@ impl<T> *const [T] {
/// assert_eq!(slice.len(), 3);
/// ```
#[inline]
#[stable(feature = "slice_ptr_len", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "const_slice_ptr_len", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "slice_ptr_len", since = "1.79.0")]
#[rustc_const_stable(feature = "const_slice_ptr_len", since = "1.79.0")]
#[rustc_allow_const_fn_unstable(ptr_metadata)]
pub const fn len(self) -> usize {
metadata(self)
Expand All @@ -1671,8 +1671,8 @@ impl<T> *const [T] {
/// assert!(!slice.is_empty());
/// ```
#[inline(always)]
#[stable(feature = "slice_ptr_len", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "const_slice_ptr_len", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "slice_ptr_len", since = "1.79.0")]
#[rustc_const_stable(feature = "const_slice_ptr_len", since = "1.79.0")]
pub const fn is_empty(self) -> bool {
self.len() == 0
}
Expand Down
Loading
Loading