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: 0 additions & 2 deletions compiler/rustc_abi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1041,7 +1041,6 @@ impl Step for Size {
}

#[inline]
#[cfg(not(bootstrap))]
fn forward_overflowing(start: Self, count: usize) -> (Self, bool) {
let (s, o) = u64::forward_overflowing(start.bytes(), count);
(Self::from_bytes(s), o)
Expand All @@ -1063,7 +1062,6 @@ impl Step for Size {
}

#[inline]
#[cfg(not(bootstrap))]
fn backward_overflowing(start: Self, count: usize) -> (Self, bool) {
let (s, o) = u64::backward_overflowing(start.bytes(), count);
(Self::from_bytes(s), o)
Expand Down
4 changes: 3 additions & 1 deletion compiler/rustc_codegen_gcc/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,9 @@ impl<'gcc, 'tcx> MiscCodegenMethods<'tcx> for CodegenCx<'gcc, 'tcx> {
let entry_name = self.sess().target.entry_name.as_ref();
if !self.functions.borrow().contains_key(entry_name) {
let conv = cfg_select! {
feature = "master" => conv_to_fn_attribute(self.sess(), self.sess().target.entry_abi),
feature = "master" => {
conv_to_fn_attribute(self.sess(), self.sess().target.entry_abi)
}
_ => None,
};
Some(self.declare_entry_fn(entry_name, fn_type, conv))
Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_codegen_ssa/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#![feature(try_blocks)]
#![recursion_limit = "256"]
// tidy-alphabetical-end
#![cfg_attr(bootstrap, feature(string_from_utf8_lossy_owned))]

//! This crate contains codegen code that is used by all codegen backends (LLVM and others).
//! The backend-agnostic functions of this crate use functions defined in various traits that
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_feature/src/accepted.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@ declare_features! (
/// Allows `extern "C-unwind" fn` to enable unwinding across ABI boundaries and treat `extern "C" fn` as nounwind.
(accepted, c_unwind, "1.81.0", Some(74990)),
/// Allows using C-variadics.
(accepted, c_variadic, "CURRENT_RUSTC_VERSION", Some(44930)),
(accepted, c_variadic, "1.99.0", Some(44930)),
/// Allows defining c-variadic naked functions with any extern ABI that is allowed
/// on c-variadic foreign functions.
(accepted, c_variadic_naked_functions, "CURRENT_RUSTC_VERSION", Some(148767)),
(accepted, c_variadic_naked_functions, "1.99.0", Some(148767)),
/// Allows `#[cfg_attr(predicate, multiple, attributes, here)]`.
(accepted, cfg_attr_multi, "1.33.0", Some(54881)),
/// Allows the use of `#[cfg(<true/false>)]`.
Expand Down
14 changes: 7 additions & 7 deletions compiler/rustc_feature/src/unstable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ declare_features! (
/// Allows checking whether or not the backend correctly supports unstable float types.
(internal, cfg_target_has_reliable_f16_f128, "1.88.0", None),
/// Allows checking whether or not the target might have thread support.
(internal, cfg_target_has_threads, "CURRENT_RUSTC_VERSION", None),
(internal, cfg_target_has_threads, "1.99.0", None),
/// Allows identifying the `compiler_builtins` crate.
(internal, compiler_builtins, "1.13.0", None),
/// Allows skipping `ConstParamTy_` trait implementation checks
Expand Down Expand Up @@ -397,7 +397,7 @@ declare_features! (
/// Target features on arm.
(unstable, arm_target_feature, "1.27.0", Some(150246)),
/// Allows using `const` operands with pointer in inline assembly.
(unstable, asm_const_ptr, "CURRENT_RUSTC_VERSION", Some(128464)),
(unstable, asm_const_ptr, "1.99.0", Some(128464)),
/// Enables experimental inline assembly support for additional architectures.
(unstable, asm_experimental_arch, "1.58.0", Some(93335)),
/// Enables experimental register support in inline assembly.
Expand Down Expand Up @@ -452,7 +452,7 @@ declare_features! (
/// Allows to use the `#[cfi_encoding = ""]` attribute.
(unstable, cfi_encoding, "1.71.0", Some(89653)),
/// Allow to have type alias types for inter-crate use.
(incomplete, checked_type_aliases, "CURRENT_RUSTC_VERSION", Some(112792)),
(incomplete, checked_type_aliases, "1.99.0", Some(112792)),
/// The `clflushopt` target feature on x86.
(unstable, clflushopt_target_feature, "1.98.0", Some(157096)),
/// Allows `for<...>` on closures and coroutines.
Expand Down Expand Up @@ -518,7 +518,7 @@ declare_features! (
/// Allows macros to customize macro argument matcher diagnostics.
(unstable, diagnostic_on_unmatched_args, "1.97.0", Some(155642)),
// Used by macros to not show their bodies in error messages. No-op with `-Z macro-backtrace`.
(unstable, diagnostic_opaque, "CURRENT_RUSTC_VERSION", Some(158813)),
(unstable, diagnostic_opaque, "1.99.0", Some(158813)),
/// Allows `#[doc(cfg(...))]`.
(unstable, doc_cfg, "1.21.0", Some(43781)),
/// Allows `#[doc(masked)]`.
Expand Down Expand Up @@ -630,7 +630,7 @@ declare_features! (
/// Provides a way to concatenate identifiers using metavariable expressions.
(unstable, macro_metavar_expr_concat, "1.81.0", Some(124225)),
/// Allows directly represented generic_const_args without the `direct_const_arg!` macro.
(incomplete, macroless_generic_const_args, "CURRENT_RUSTC_VERSION", Some(159006)),
(incomplete, macroless_generic_const_args, "1.99.0", Some(159006)),
/// Allows `#[marker]` on certain traits allowing overlapping implementations.
(unstable, marker_trait_attr, "1.30.0", Some(29864)),
/// Enable mgca `type const` syntax before expansion.
Expand Down Expand Up @@ -660,13 +660,13 @@ 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.
(unstable, mut_restriction, "CURRENT_RUSTC_VERSION", Some(105077)),
(unstable, mut_restriction, "1.99.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.
(unstable, naked_functions_target_feature, "1.86.0", Some(138568)),
/// Allows providing names to parameters of `impl Fn` etc
(incomplete, named_fn_trait_parameters, "CURRENT_RUSTC_VERSION", Some(158499)),
(incomplete, named_fn_trait_parameters, "1.99.0", Some(158499)),
/// Allows specifying the as-needed link modifier
(unstable, native_link_modifiers_as_needed, "1.53.0", Some(81490)),
/// Allow negative trait implementations.
Expand Down
2 changes: 0 additions & 2 deletions compiler/rustc_index_macros/src/newtype.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,14 +138,12 @@ impl Parse for Newtype {
}

#[inline]
#[cfg(not(bootstrap))]
fn forward_overflowing(start: Self, u: usize) -> (Self, bool) {
let (s, o) = Self::index(start).overflowing_add(u);
(Self::from_usize(s), o)
}

#[inline]
#[cfg(not(bootstrap))]
fn backward_overflowing(start: Self, u: usize) -> (Self, bool) {
let (s, o) = Self::index(start).overflowing_sub(u);
(Self::from_usize(s), o)
Expand Down
12 changes: 4 additions & 8 deletions compiler/rustc_lint_defs/src/builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4560,16 +4560,13 @@ declare_lint! {
///
/// ### Example
///
// FIXME(bootstrap): Use a regular Rust doc code block after stage 0 emits
// `malformed_diagnostic_filters` instead of E0232 for this example.
#[cfg_attr(bootstrap, doc = "```rust,ignore (stage 0 emits E0232)")]
#[cfg_attr(not(bootstrap), doc = "```rust")]
/// ```rust
/// #![feature(rustc_attrs)]
/// #![allow(internal_features)]
///
/// #[rustc_on_unimplemented(on(invalid, message = "unused"))]
/// trait Trait {}
#[doc = "```"]
/// ```
///
/// {{produces}}
///
Expand Down Expand Up @@ -5650,13 +5647,12 @@ declare_lint! {
///
/// ### Example
///
#[cfg_attr(bootstrap, doc = "```rust,compile_fail")]
#[cfg_attr(not(bootstrap), doc = "```rust,no_run")]
/// ```rust,no_run
/// fn main() {
/// let x = panic!();
/// x.clone();
/// }
#[doc = "```"]
/// ```
///
/// {{produces}}
///
Expand Down
6 changes: 3 additions & 3 deletions library/alloc/src/boxed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ mod iter;
/// [`ThinBox`] implementation.
mod thin;

#[stable(feature = "boxed_array_value_iter", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "boxed_array_value_iter", since = "1.99.0")]
pub use iter::BoxedArrayIntoIter;
#[unstable(feature = "thin_box", issue = "92791")]
pub use thin::ThinBox;
Expand Down Expand Up @@ -1374,7 +1374,7 @@ impl<T: ?Sized> Box<T> {
///
/// [memory layout]: self#memory-layout
/// [considerations for unsafe code]: self#considerations-for-unsafe-code
#[stable(feature = "box_vec_non_null", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "box_vec_non_null", since = "1.99.0")]
#[inline]
#[must_use = "call `drop(Box::from_non_null(ptr))` if you intend to drop the `Box`"]
pub unsafe fn from_non_null(ptr: NonNull<T>) -> Self {
Expand Down Expand Up @@ -1490,7 +1490,7 @@ impl<T: ?Sized> Box<T> {
///
/// [memory layout]: self#memory-layout
#[must_use = "losing the pointer will leak memory"]
#[stable(feature = "box_vec_non_null", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "box_vec_non_null", since = "1.99.0")]
#[inline]
pub fn into_non_null(b: Self) -> NonNull<T> {
// As of August 2026, we cannot utilize `Box::leak`
Expand Down
32 changes: 16 additions & 16 deletions library/alloc/src/boxed/iter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,20 +196,20 @@ impl<'a> FromIterator<Cow<'a, str>> for Box<str> {

/// This implementation is required to make sure that the `Box<[I; N]>: IntoIterator`
/// implementation doesn't overlap with `IntoIterator for T where T: Iterator` blanket.
#[stable(feature = "boxed_array_value_iter", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "boxed_array_value_iter", since = "1.99.0")]
impl<I, const N: usize, A: Allocator> !Iterator for Box<[I; N], A> {}

/// This implementation is required to make sure that the `&Box<[I; N]>: IntoIterator`
/// implementation doesn't overlap with `IntoIterator for T where T: Iterator` blanket.
#[stable(feature = "boxed_array_value_iter", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "boxed_array_value_iter", since = "1.99.0")]
impl<'a, const N: usize, I, A: Allocator> !Iterator for &'a Box<[I; N], A> {}

/// This implementation is required to make sure that the `&mut Box<[I; N]>: IntoIterator`
/// implementation doesn't overlap with `IntoIterator for T where T: Iterator` blanket.
#[stable(feature = "boxed_array_value_iter", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "boxed_array_value_iter", since = "1.99.0")]
impl<'a, const N: usize, I, A: Allocator> !Iterator for &'a mut Box<[I; N], A> {}

#[stable(feature = "boxed_array_value_iter", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "boxed_array_value_iter", since = "1.99.0")]
impl<'a, T, const N: usize, A: Allocator> IntoIterator for &'a Box<[T; N], A> {
type IntoIter = slice::Iter<'a, T>;
type Item = &'a T;
Expand All @@ -218,7 +218,7 @@ impl<'a, T, const N: usize, A: Allocator> IntoIterator for &'a Box<[T; N], A> {
}
}

#[stable(feature = "boxed_array_value_iter", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "boxed_array_value_iter", since = "1.99.0")]
impl<'a, T, const N: usize, A: Allocator> IntoIterator for &'a mut Box<[T; N], A> {
type IntoIter = slice::IterMut<'a, T>;
type Item = &'a mut T;
Expand All @@ -228,7 +228,7 @@ impl<'a, T, const N: usize, A: Allocator> IntoIterator for &'a mut Box<[T; N], A
}

/// A by-value `Box<[T; N]>` iterator.
#[stable(feature = "boxed_array_value_iter", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "boxed_array_value_iter", since = "1.99.0")]
#[rustc_insignificant_dtor]
pub struct BoxedArrayIntoIter<T, const N: usize, A: Allocator = Global> {
// FIXME: make a more efficient implementation (without the need to store capacity)
Expand All @@ -238,19 +238,19 @@ pub struct BoxedArrayIntoIter<T, const N: usize, A: Allocator = Global> {
impl<T, const N: usize, A: Allocator> BoxedArrayIntoIter<T, N, A> {
/// Returns an immutable slice of all elements that have not been yielded
/// yet.
#[stable(feature = "boxed_array_value_iter", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "boxed_array_value_iter", since = "1.99.0")]
pub fn as_slice(&self) -> &[T] {
self.inner.as_slice()
}

/// Returns a mutable slice of all elements that have not been yielded yet.
#[stable(feature = "boxed_array_value_iter", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "boxed_array_value_iter", since = "1.99.0")]
pub fn as_mut_slice(&mut self) -> &mut [T] {
self.inner.as_mut_slice()
}
}

#[stable(feature = "boxed_array_value_iter", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "boxed_array_value_iter", since = "1.99.0")]
impl<T, const N: usize, A: Allocator> Iterator for BoxedArrayIntoIter<T, N, A> {
type Item = T;
fn next(&mut self) -> Option<Self::Item> {
Expand Down Expand Up @@ -283,7 +283,7 @@ impl<T, const N: usize, A: Allocator> Iterator for BoxedArrayIntoIter<T, N, A> {
}
}

#[stable(feature = "boxed_array_value_iter", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "boxed_array_value_iter", since = "1.99.0")]
impl<T, const N: usize, A: Allocator> DoubleEndedIterator for BoxedArrayIntoIter<T, N, A> {
fn next_back(&mut self) -> Option<Self::Item> {
self.inner.next_back()
Expand All @@ -302,7 +302,7 @@ impl<T, const N: usize, A: Allocator> DoubleEndedIterator for BoxedArrayIntoIter
}
}

#[stable(feature = "boxed_array_value_iter", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "boxed_array_value_iter", since = "1.99.0")]
impl<T, const N: usize, A: Allocator> ExactSizeIterator for BoxedArrayIntoIter<T, N, A> {
fn len(&self) -> usize {
self.inner.len()
Expand All @@ -313,21 +313,21 @@ impl<T, const N: usize, A: Allocator> ExactSizeIterator for BoxedArrayIntoIter<T
}
}

#[stable(feature = "boxed_array_value_iter", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "boxed_array_value_iter", since = "1.99.0")]
impl<T, const N: usize, A: Allocator> FusedIterator for BoxedArrayIntoIter<T, N, A> {}

#[stable(feature = "boxed_array_value_iter", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "boxed_array_value_iter", since = "1.99.0")]
unsafe impl<T, const N: usize, A: Allocator> TrustedLen for BoxedArrayIntoIter<T, N, A> {}

#[cfg(not(no_global_oom_handling))]
#[stable(feature = "boxed_array_value_iter", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "boxed_array_value_iter", since = "1.99.0")]
impl<T: Clone, const N: usize, A: Clone + Allocator> Clone for BoxedArrayIntoIter<T, N, A> {
fn clone(&self) -> Self {
Self { inner: self.inner.clone() }
}
}

#[stable(feature = "boxed_array_value_iter", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "boxed_array_value_iter", since = "1.99.0")]
impl<T: fmt::Debug, const N: usize, A: Allocator> fmt::Debug for BoxedArrayIntoIter<T, N, A> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
// Only print the elements that were not yielded yet: we cannot
Expand All @@ -336,7 +336,7 @@ impl<T: fmt::Debug, const N: usize, A: Allocator> fmt::Debug for BoxedArrayIntoI
}
}

#[stable(feature = "boxed_array_value_iter", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "boxed_array_value_iter", since = "1.99.0")]
impl<T, const N: usize, A: Allocator> IntoIterator for Box<[T; N], A> {
type IntoIter = BoxedArrayIntoIter<T, N, A>;
type Item = T;
Expand Down
2 changes: 1 addition & 1 deletion library/alloc/src/collections/vec_deque/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1485,7 +1485,7 @@ impl<T, A: Allocator> VecDeque<T, A> {
/// assert_eq!(buf.as_slices(), (&[5][..], &[][..]));
/// ```
#[doc(alias = "truncate_front")]
#[stable(feature = "vec_deque_truncate_front", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "vec_deque_truncate_front", since = "1.99.0")]
pub fn retain_back(&mut self, len: usize) {
unsafe {
if len >= self.len {
Expand Down
4 changes: 2 additions & 2 deletions library/alloc/src/io/read.rs
Original file line number Diff line number Diff line change
Expand Up @@ -784,8 +784,8 @@ pub fn read_to_string<R: Read>(mut reader: R) -> Result<String> {
#[doc(hidden)]
#[unstable(feature = "core_io_internals", reason = "exposed only for libstd", issue = "none")]
pub const DEFAULT_BUF_SIZE: usize = cfg_select! {
target_os = "espidf" => { 512 },
_ => { 8 * 1024 }
target_os = "espidf" => 512,
_ => 8 * 1024,
};

/// Several `read_to_string` and `read_line` methods in the standard library will
Expand Down
4 changes: 2 additions & 2 deletions library/alloc/src/string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@ impl String {
/// ```
#[must_use]
#[cfg(not(no_global_oom_handling))]
#[stable(feature = "string_from_utf8_lossy_owned", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "string_from_utf8_lossy_owned", since = "1.99.0")]
pub fn from_utf8_lossy_owned(v: Vec<u8>) -> String {
if let Cow::Owned(string) = String::from_utf8_lossy(&v) {
string
Expand Down Expand Up @@ -2279,7 +2279,7 @@ impl FromUtf8Error {
/// ```
#[must_use]
#[cfg(not(no_global_oom_handling))]
#[stable(feature = "string_from_utf8_lossy_owned", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "string_from_utf8_lossy_owned", since = "1.99.0")]
pub fn into_utf8_lossy(self) -> String {
const REPLACEMENT: &str = "\u{FFFD}";

Expand Down
4 changes: 2 additions & 2 deletions library/alloc/src/vec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,7 @@ impl<T> Vec<T> {
/// }
/// ```
#[inline]
#[stable(feature = "box_vec_non_null", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "box_vec_non_null", since = "1.99.0")]
#[rustc_const_unstable(feature = "const_heap", issue = "79597")]
pub const unsafe fn from_parts(ptr: NonNull<T>, length: usize, capacity: usize) -> Self {
unsafe { Self::from_parts_in(ptr, length, capacity, Global) }
Expand Down Expand Up @@ -871,7 +871,7 @@ impl<T> Vec<T> {
/// assert_eq!(rebuilt, [4294967295, 0, 1]);
/// ```
#[must_use = "losing the pointer will leak memory"]
#[stable(feature = "box_vec_non_null", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "box_vec_non_null", since = "1.99.0")]
#[rustc_const_unstable(feature = "const_heap", issue = "79597")]
pub const fn into_parts(self) -> (NonNull<T>, usize, usize) {
let (ptr, len, capacity) = self.into_raw_parts();
Expand Down
4 changes: 2 additions & 2 deletions library/core/src/alloc/layout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,8 @@ impl Layout {
///
/// [trait object]: ../../book/ch17-02-trait-objects.html
/// [extern type]: ../../unstable-book/language-features/extern-types.html
#[stable(feature = "layout_for_ptr", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "layout_for_ptr", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "layout_for_ptr", since = "1.99.0")]
#[rustc_const_stable(feature = "layout_for_ptr", since = "1.99.0")]
#[must_use]
#[inline]
pub const unsafe fn for_value_raw<T: ?Sized>(val: *const T) -> Self {
Expand Down
2 changes: 1 addition & 1 deletion library/core/src/array/iter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ impl<T, const N: usize> IntoIter<T, N> {
}
}

#[stable(feature = "boxed_array_value_iter", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "boxed_array_value_iter", since = "1.99.0")]
impl<T, const N: usize> !Iterator for [T; N] {}

// Note: the `#[rustc_skip_during_method_dispatch(array)]` on `trait IntoIterator`
Expand Down
2 changes: 1 addition & 1 deletion library/core/src/ffi/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ use crate::fmt;
pub mod c_str;

mod va_list;
#[stable(feature = "c_variadic", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "c_variadic", since = "1.99.0")]
pub use self::va_list::{VaArgSafe, VaList};

mod primitives;
Expand Down
Loading
Loading