Skip to content
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
2 changes: 1 addition & 1 deletion compiler/rustc_feature/src/removed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ declare_features! (
/// Allows deriving traits as per `SmartPointer` specification
(removed, derive_smart_pointer, "1.84.0", Some(123430), Some("replaced by `CoercePointee`"), 131284),
/// Allows macros to customize macro argument matcher diagnostics.
(removed, diagnostic_on_unmatch_args, "CURRENT_RUSTC_VERSION", Some(155642), Some("renamed to `diagnostic_on_unmatched_args`"), 157887),
(removed, diagnostic_on_unmatch_args, "1.98.0", Some(155642), Some("renamed to `diagnostic_on_unmatched_args`"), 157887),
/// Tells rustdoc to automatically generate `#[doc(cfg(...))]`.
(removed, doc_auto_cfg, "1.92.0", Some(43781), Some("merged into `doc_cfg`"), 138907),
/// Allows `#[doc(cfg_hide(...))]`.
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 @@ -457,7 +457,7 @@ declare_features! (
/// Allows to use the `#[cfi_encoding = ""]` attribute.
(unstable, cfi_encoding, "1.71.0", Some(89653)),
/// The `clflushopt` target feature on x86.
(unstable, clflushopt_target_feature, "CURRENT_RUSTC_VERSION", Some(157096)),
(unstable, clflushopt_target_feature, "1.98.0", Some(157096)),
/// Allows `for<...>` on closures and coroutines.
(unstable, closure_lifetime_binder, "1.64.0", Some(97362)),
/// Allows `#[track_caller]` on closures and coroutines.
Expand Down Expand Up @@ -515,7 +515,7 @@ declare_features! (
/// Allows giving on-move borrowck custom diagnostic messages for a type
(unstable, diagnostic_on_move, "1.96.0", Some(154181)),
/// Allows giving custom types diagnostic messages on type errors
(unstable, diagnostic_on_type_error, "CURRENT_RUSTC_VERSION", Some(155382)),
(unstable, diagnostic_on_type_error, "1.98.0", Some(155382)),
/// Allows giving unresolved imports a custom diagnostic message
(unstable, diagnostic_on_unknown, "1.96.0", Some(152900)),
/// Allows macros to customize macro argument matcher diagnostics.
Expand Down Expand Up @@ -600,7 +600,7 @@ declare_features! (
/// Allows associated types in inherent impls.
(incomplete, inherent_associated_types, "1.52.0", Some(8995)),
/// Enable #[instrument_fn] on function.
(unstable, instrument_fn, "CURRENT_RUSTC_VERSION", Some(157081)),
(unstable, instrument_fn, "1.98.0", Some(157081)),
/// Allows using `pointer` and `reference` in intra-doc links
(unstable, intra_doc_pointers, "1.51.0", Some(80896)),
/// lahfsahf target feature on x86.
Expand All @@ -615,7 +615,7 @@ declare_features! (
/// Target features on loongarch.
(unstable, loongarch_target_feature, "1.73.0", Some(150252)),
/// Allows use of loop optimization hints via attributes.
(unstable, loop_hints, "CURRENT_RUSTC_VERSION", Some(156874)),
(unstable, loop_hints, "1.98.0", Some(156874)),
/// Allows fused `loop`/`match` for direct intraprocedural jumps.
(incomplete, loop_match, "1.90.0", Some(132306)),
/// Target features on m68k.
Expand Down Expand Up @@ -659,7 +659,7 @@ declare_features! (
/// Allows `mut ref` and `mut ref mut` identifier patterns.
(incomplete, mut_ref, "1.79.0", Some(123076)),
/// Allows `mut(crate) field: Type` restrictions.
(incomplete, mut_restriction, "CURRENT_RUSTC_VERSION", Some(105077)),
(incomplete, mut_restriction, "1.98.0", Some(105077)),
/// Allows using `#[naked]` on `extern "Rust"` functions.
(unstable, naked_functions_rustic_abi, "1.88.0", Some(138997)),
/// Allows using `#[target_feature(enable = "...")]` on `#[naked]` on functions.
Expand Down Expand Up @@ -720,7 +720,7 @@ declare_features! (
/// Allows `extern "rust-preserve-none"`.
(unstable, rust_preserve_none_cc, "1.95.0", Some(151401)),
/// Allows `extern "tail"`.
(unstable, rust_tail_cc, "CURRENT_RUSTC_VERSION", Some(157427)),
(unstable, rust_tail_cc, "1.98.0", Some(157427)),
/// Target features on s390x.
(unstable, s390x_target_feature, "1.82.0", Some(150259)),
/// Allows the use of the `sanitize` attribute.
Expand All @@ -733,7 +733,7 @@ declare_features! (
(incomplete, specialization, "1.7.0", Some(31844)),
/// Experimental "splatting" of function call arguments at the call site.
/// e.g. `foo(a, b, c)` calls `#[splat] fn foo((a: A, b: B, c: C))`.
(incomplete, splat, "CURRENT_RUSTC_VERSION", Some(153629)),
(incomplete, splat, "1.98.0", Some(153629)),
/// Allows using `#[rustc_align_static(...)]` on static items.
(unstable, static_align, "1.91.0", Some(146177)),
/// Allows attributes on expressions and non-item statements.
Expand Down Expand Up @@ -764,7 +764,7 @@ declare_features! (
/// not changed from prior instances of the same struct (RFC #2528)
(unstable, type_changing_struct_update, "1.58.0", Some(86555)),
/// Allows using `_ = <range-or-int>` enum variants.
(incomplete, unnamed_enum_variants, "CURRENT_RUSTC_VERSION", Some(156628)),
(incomplete, unnamed_enum_variants, "1.98.0", Some(156628)),
/// Allows using `unsafe<'a> &'a T` unsafe binder types.
(incomplete, unsafe_binders, "1.85.0", Some(130516)),
/// Allows declaring fields `unsafe`.
Expand All @@ -789,7 +789,7 @@ declare_features! (
/// Allows use of the `xop` target-feature
(unstable, xop_target_feature, "1.81.0", Some(127208)),
/// Allows use of the Xtensa target-features
(unstable, xtensa_target_feature, "CURRENT_RUSTC_VERSION", Some(157063)),
(unstable, xtensa_target_feature, "1.98.0", Some(157063)),
/// Allows `do yeet` expressions
(unstable, yeet_expr, "1.62.0", Some(96373)),
(unstable, yield_expr, "1.87.0", Some(43122)),
Expand Down
9 changes: 4 additions & 5 deletions compiler/rustc_lint/src/runtime_symbols.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,10 @@ declare_lint! {
///
/// ### Example
///
#[cfg_attr(bootstrap, doc = "```rust")]
#[cfg_attr(not(bootstrap), doc = "```rust,compile_fail")]
#[cfg_attr(not(bootstrap), doc = "#[unsafe(no_mangle)]")]
/// ```rust,compile_fail
/// #[unsafe(no_mangle)]
/// pub fn strlen() {} // invalid definition of the `strlen` function
#[doc = "```"]
/// ```
///
/// {{produces}}
///
Expand All @@ -47,7 +46,7 @@ declare_lint! {
/// ### Example
///
/// ```rust,no_run,standalone_crate
#[cfg_attr(not(bootstrap), doc = "#[unsafe(no_mangle)]")]
/// #[unsafe(no_mangle)]
/// pub extern "C" fn strlen(ptr: *mut f32) -> usize { 0 }
/// // suspicious definition of the `strlen` function
/// // `ptr` should be `*const std::ffi::c_char`
Expand Down
2 changes: 0 additions & 2 deletions compiler/rustc_metadata/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// tidy-alphabetical-start
#![allow(internal_features)]
#![cfg_attr(bootstrap, feature(result_option_map_or_default))]
#![cfg_attr(bootstrap, feature(strip_circumfix))]
#![feature(error_iter)]
#![feature(file_buffered)]
#![feature(gen_blocks)]
Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_middle/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
// tidy-alphabetical-start
#![allow(internal_features)]
#![allow(rustc::direct_use_of_rustc_type_ir)]
#![cfg_attr(bootstrap, feature(box_as_ptr))]
#![cfg_attr(doc, feature(intra_doc_pointers))]
#![feature(allocator_api)]
#![feature(associated_type_defaults)]
Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_trait_selection/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
//! This API is completely unstable and subject to change.

// tidy-alphabetical-start
#![cfg_attr(bootstrap, feature(strip_circumfix))]
#![feature(associated_type_defaults)]
#![feature(default_field_values)]
#![feature(deref_patterns)]
Expand Down
4 changes: 2 additions & 2 deletions library/alloc/src/boxed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1780,7 +1780,7 @@ impl<T: ?Sized, A: Allocator> Box<T, A> {
/// [`as_ptr`]: Self::as_ptr
/// [`as_non_null`]: Self::as_non_null
#[must_use]
#[stable(feature = "box_as_ptr", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "box_as_ptr", since = "1.98.0")]
#[rustc_never_returns_null_ptr]
#[rustc_as_ptr]
#[inline]
Expand Down Expand Up @@ -1829,7 +1829,7 @@ impl<T: ?Sized, A: Allocator> Box<T, A> {
/// [`as_ptr`]: Self::as_ptr
/// [`as_non_null`]: Self::as_non_null
#[must_use]
#[stable(feature = "box_as_ptr", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "box_as_ptr", since = "1.98.0")]
#[rustc_never_returns_null_ptr]
#[rustc_as_ptr]
#[inline]
Expand Down
8 changes: 4 additions & 4 deletions library/alloc/src/string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,7 @@ impl String {
/// assert!(String::from_utf16le(v).is_err());
/// ```
#[cfg(not(no_global_oom_handling))]
#[stable(feature = "str_from_utf16_endian", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "str_from_utf16_endian", since = "1.98.0")]
pub fn from_utf16le(v: &[u8]) -> Result<String, FromUtf16Error> {
let (chunks, []) = v.as_chunks::<2>() else {
return Err(FromUtf16Error { kind: FromUtf16ErrorKind::OddBytes });
Expand Down Expand Up @@ -823,7 +823,7 @@ impl String {
/// String::from_utf16le_lossy(v));
/// ```
#[cfg(not(no_global_oom_handling))]
#[stable(feature = "str_from_utf16_endian", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "str_from_utf16_endian", since = "1.98.0")]
pub fn from_utf16le_lossy(v: &[u8]) -> String {
match (cfg!(target_endian = "little"), unsafe { v.align_to::<u16>() }) {
(true, ([], v, [])) => Self::from_utf16_lossy(v),
Expand Down Expand Up @@ -858,7 +858,7 @@ impl String {
/// assert!(String::from_utf16be(v).is_err());
/// ```
#[cfg(not(no_global_oom_handling))]
#[stable(feature = "str_from_utf16_endian", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "str_from_utf16_endian", since = "1.98.0")]
pub fn from_utf16be(v: &[u8]) -> Result<String, FromUtf16Error> {
let (chunks, []) = v.as_chunks::<2>() else {
return Err(FromUtf16Error { kind: FromUtf16ErrorKind::OddBytes });
Expand Down Expand Up @@ -896,7 +896,7 @@ impl String {
/// String::from_utf16be_lossy(v));
/// ```
#[cfg(not(no_global_oom_handling))]
#[stable(feature = "str_from_utf16_endian", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "str_from_utf16_endian", since = "1.98.0")]
pub fn from_utf16be_lossy(v: &[u8]) -> String {
match (cfg!(target_endian = "big"), unsafe { v.align_to::<u16>() }) {
(true, ([], v, [])) => Self::from_utf16_lossy(v),
Expand Down
4 changes: 2 additions & 2 deletions library/core/src/bool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ impl bool {
/// // evaluated eagerly.
/// assert_eq!(a, 2);
/// ```
#[stable(feature = "bool_to_result", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "bool_to_result", since = "1.98.0")]
#[rustc_const_unstable(feature = "const_bool", issue = "151531")]
#[inline]
pub const fn ok_or<E: [const] Destruct>(self, err: E) -> Result<(), E> {
Expand All @@ -120,7 +120,7 @@ impl bool {
/// // `ok_or_else`.
/// assert_eq!(a, 1);
/// ```
#[stable(feature = "bool_to_result", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "bool_to_result", since = "1.98.0")]
#[rustc_const_unstable(feature = "const_bool", issue = "151531")]
#[inline]
pub const fn ok_or_else<E, F: [const] FnOnce() -> E + [const] Destruct>(
Expand Down
2 changes: 1 addition & 1 deletion library/core/src/fmt/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pub enum Alignment {
Center,
}

#[stable(feature = "int_format_into", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "int_format_into", since = "1.98.0")]
pub use num_buffer::NumBuffer;
#[unstable(feature = "fmt_internals", issue = "none")]
pub use num_buffer::NumBufferTrait;
Expand Down
8 changes: 4 additions & 4 deletions library/core/src/fmt/num.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ macro_rules! impl_Display {
#[doc = concat!("let n2 = ", stringify!($Signed::MAX), ";")]
#[doc = concat!("assert_eq!(n2.format_into(&mut buf), ", stringify!($Signed::MAX), ".to_string());")]
/// ```
#[stable(feature = "int_format_into", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "int_format_into", since = "1.98.0")]
pub fn format_into(self, buf: &mut NumBuffer<Self>) -> &str {
let mut offset;

Expand Down Expand Up @@ -316,7 +316,7 @@ macro_rules! impl_Display {
#[doc = concat!("let n2 = ", stringify!($Unsigned::MAX), ";")]
#[doc = concat!("assert_eq!(n2.format_into(&mut buf), ", stringify!($Unsigned::MAX), ".to_string());")]
/// ```
#[stable(feature = "int_format_into", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "int_format_into", since = "1.98.0")]
pub fn format_into(self, buf: &mut NumBuffer<Self>) -> &str {
let offset;

Expand Down Expand Up @@ -756,7 +756,7 @@ impl u128 {
/// let mut buf2 = NumBuffer::new();
/// assert_eq!(n2.format_into(&mut buf2), u128::MAX.to_string());
/// ```
#[stable(feature = "int_format_into", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "int_format_into", since = "1.98.0")]
pub fn format_into(self, buf: &mut NumBuffer<Self>) -> &str {
let diff = buf.buf.len() - U128_MAX_DEC_N;
// FIXME: Once const generics are better, use `NumberBufferTrait::BUF_SIZE` as generic const
Expand Down Expand Up @@ -788,7 +788,7 @@ impl i128 {
/// let n2 = i128::MAX;
/// assert_eq!(n2.format_into(&mut buf), i128::MAX.to_string());
/// ```
#[stable(feature = "int_format_into", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "int_format_into", since = "1.98.0")]
pub fn format_into(self, buf: &mut NumBuffer<Self>) -> &str {
let diff = buf.buf.len() - U128_MAX_DEC_N;
// FIXME: Once const generics are better, use `NumberBufferTrait::BUF_SIZE` as generic const
Expand Down
14 changes: 7 additions & 7 deletions library/core/src/fmt/num_buffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ pub trait NumBufferTrait {
macro_rules! impl_NumBufferTrait {
($($signed:ident, $unsigned:ident,)*) => {
$(
#[stable(feature = "int_format_into", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "int_format_into", since = "1.98.0")]
impl NumBufferTrait for $signed {
// `+ 2` and not `+ 1` to include the `-` character.
const DEFAULT: Self::Buf = [MaybeUninit::<u8>::uninit(); $signed::MAX.ilog10() as usize + 2];
type Buf = [MaybeUninit<u8>; $signed::MAX.ilog10() as usize + 2];
}
#[stable(feature = "int_format_into", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "int_format_into", since = "1.98.0")]
impl NumBufferTrait for $unsigned {
const DEFAULT: Self::Buf = [MaybeUninit::<u8>::uninit(); $unsigned::MAX.ilog10() as usize + 1];
type Buf = [MaybeUninit<u8>; $unsigned::MAX.ilog10() as usize + 1];
Expand Down Expand Up @@ -55,24 +55,24 @@ impl_NumBufferTrait! {
/// let n2 = -1972i32;
/// assert_eq!(n2.format_into(&mut buf), "-1972");
/// ```
#[stable(feature = "int_format_into", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "int_format_into", since = "1.98.0")]
pub struct NumBuffer<T: NumBufferTrait> {
pub(crate) buf: T::Buf,
phantom: core::marker::PhantomData<T>,
}

#[stable(feature = "int_format_into", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "int_format_into", since = "1.98.0")]
impl<T: NumBufferTrait> core::fmt::Debug for NumBuffer<T> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.debug_struct("NumBuffer").finish()
}
}

#[stable(feature = "int_format_into", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "int_format_into", since = "1.98.0")]
impl<T: NumBufferTrait> NumBuffer<T> {
/// Initializes internal buffer.
#[stable(feature = "int_format_into", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "int_format_into", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "int_format_into", since = "1.98.0")]
#[rustc_const_stable(feature = "int_format_into", since = "1.98.0")]
pub const fn new() -> Self {
NumBuffer { buf: T::DEFAULT, phantom: core::marker::PhantomData }
}
Expand Down
20 changes: 10 additions & 10 deletions library/core/src/num/f32.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1694,8 +1694,8 @@ impl f32 {
///
/// See [algebraic operators](primitive@f32#algebraic-operators) for more info.
#[must_use = "method returns a new number and does not mutate the original value"]
#[stable(feature = "float_algebraic", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "float_algebraic", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "float_algebraic", since = "1.98.0")]
#[rustc_const_stable(feature = "float_algebraic", since = "1.98.0")]
#[inline]
pub const fn algebraic_add(self, rhs: f32) -> f32 {
intrinsics::fadd_algebraic(self, rhs)
Expand All @@ -1705,8 +1705,8 @@ impl f32 {
///
/// See [algebraic operators](primitive@f32#algebraic-operators) for more info.
#[must_use = "method returns a new number and does not mutate the original value"]
#[stable(feature = "float_algebraic", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "float_algebraic", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "float_algebraic", since = "1.98.0")]
#[rustc_const_stable(feature = "float_algebraic", since = "1.98.0")]
#[inline]
pub const fn algebraic_sub(self, rhs: f32) -> f32 {
intrinsics::fsub_algebraic(self, rhs)
Expand All @@ -1716,8 +1716,8 @@ impl f32 {
///
/// See [algebraic operators](primitive@f32#algebraic-operators) for more info.
#[must_use = "method returns a new number and does not mutate the original value"]
#[stable(feature = "float_algebraic", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "float_algebraic", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "float_algebraic", since = "1.98.0")]
#[rustc_const_stable(feature = "float_algebraic", since = "1.98.0")]
#[inline]
pub const fn algebraic_mul(self, rhs: f32) -> f32 {
intrinsics::fmul_algebraic(self, rhs)
Expand All @@ -1727,8 +1727,8 @@ impl f32 {
///
/// See [algebraic operators](primitive@f32#algebraic-operators) for more info.
#[must_use = "method returns a new number and does not mutate the original value"]
#[stable(feature = "float_algebraic", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "float_algebraic", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "float_algebraic", since = "1.98.0")]
#[rustc_const_stable(feature = "float_algebraic", since = "1.98.0")]
#[inline]
pub const fn algebraic_div(self, rhs: f32) -> f32 {
intrinsics::fdiv_algebraic(self, rhs)
Expand All @@ -1738,8 +1738,8 @@ impl f32 {
///
/// See [algebraic operators](primitive@f32#algebraic-operators) for more info.
#[must_use = "method returns a new number and does not mutate the original value"]
#[stable(feature = "float_algebraic", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "float_algebraic", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "float_algebraic", since = "1.98.0")]
#[rustc_const_stable(feature = "float_algebraic", since = "1.98.0")]
#[inline]
pub const fn algebraic_rem(self, rhs: f32) -> f32 {
intrinsics::frem_algebraic(self, rhs)
Expand Down
Loading
Loading