Skip to content
Open
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
4 changes: 2 additions & 2 deletions compiler/rustc_data_structures/src/unord.rs
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ pub struct UnordSet<V: Eq + Hash> {

impl<V: Eq + Hash> UnordCollection for UnordSet<V> {}

impl<V: Eq + Hash> const Default for UnordSet<V> {
const impl<V: Eq + Hash> Default for UnordSet<V> {
#[inline]
fn default() -> Self {
Self { inner: FxHashSet::with_hasher(FxBuildHasher) }
Expand Down Expand Up @@ -456,7 +456,7 @@ pub struct UnordMap<K: Eq + Hash, V> {

impl<K: Eq + Hash, V> UnordCollection for UnordMap<K, V> {}

impl<K: Eq + Hash, V> const Default for UnordMap<K, V> {
const impl<K: Eq + Hash, V> Default for UnordMap<K, V> {
#[inline]
fn default() -> Self {
Self { inner: FxHashMap::with_hasher(FxBuildHasher) }
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_feature/src/accepted.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ declare_features! (
/// Allows `cfg(target_feature = "...")`.
(accepted, cfg_target_feature, "1.27.0", Some(29717)),
/// Allows `cfg(target_has_atomic_primitive_alignment = "...")`.
(accepted, cfg_target_has_atomic_equal_alignment, "CURRENT_RUSTC_VERSION", Some(93822)),
(accepted, cfg_target_has_atomic_equal_alignment, "1.97.0", Some(93822)),
/// Allows `cfg(target_vendor = "...")`.
(accepted, cfg_target_vendor, "1.33.0", Some(29718)),
/// Allows implementing `Clone` for closures where possible (RFC 2132).
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 @@ -283,7 +283,7 @@ declare_features! (
(removed, string_deref_patterns, "1.94.0", Some(87121), Some("superseded by `deref_patterns`"), 150530),
(removed, struct_inherit, "1.0.0", None, None),
/// Allows the use of target_feature when a function is marked inline(always).
(removed, target_feature_inline_always, "CURRENT_RUSTC_VERSION", Some(145574),
(removed, target_feature_inline_always, "1.97.0", Some(145574),
Some("removed because of unfixable soundness issues")),
(removed, test_removed_feature, "1.0.0", None, None),
/// Allows using items which are missing stability attributes
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 @@ -257,7 +257,7 @@ declare_features! (
/// Allows identifying the `compiler_builtins` crate.
(internal, compiler_builtins, "1.13.0", None),
/// Allows skipping `ConstParamTy_` trait implementation checks
(internal, const_param_ty_unchecked, "CURRENT_RUSTC_VERSION", None),
(internal, const_param_ty_unchecked, "1.97.0", None),
/// Allows writing custom MIR
(internal, custom_mir, "1.65.0", None),
/// Implementation details of externally implementable items
Expand Down Expand Up @@ -381,7 +381,7 @@ declare_features! (
/// Allows `extern "riscv-interrupt-m" fn()` and `extern "riscv-interrupt-s" fn()`.
(unstable, abi_riscv_interrupt, "1.73.0", Some(111889)),
/// Allows `extern "Swift" fn()`.
(unstable, abi_swift, "CURRENT_RUSTC_VERSION", Some(156481)),
(unstable, abi_swift, "1.97.0", Some(156481)),
/// Allows `extern "x86-interrupt" fn()`.
(unstable, abi_x86_interrupt, "1.17.0", Some(40180)),
/// Allows additional const parameter types, such as `[u8; 10]` or user defined types
Expand Down Expand Up @@ -426,7 +426,7 @@ declare_features! (
(unstable, c_variadic, "1.34.0", Some(44930)),
/// Allows defining c-variadic functions on targets where this feature has not yet
/// undergone sufficient testing for stabilization.
(unstable, c_variadic_experimental_arch, "CURRENT_RUSTC_VERSION", Some(155973)),
(unstable, c_variadic_experimental_arch, "1.97.0", Some(155973)),
/// Allows defining c-variadic naked functions with any extern ABI that is allowed
/// on c-variadic foreign functions.
(unstable, c_variadic_naked_functions, "1.93.0", Some(148767)),
Expand All @@ -445,7 +445,7 @@ declare_features! (
/// Allows `cfg(target_has_atomic_load_store = "...")`.
(unstable, cfg_target_has_atomic, "1.60.0", Some(94039)),
/// Allows `cfg(target_object_format = "...")`.
(unstable, cfg_target_object_format, "CURRENT_RUSTC_VERSION", Some(152586)),
(unstable, cfg_target_object_format, "1.97.0", Some(152586)),
/// 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.
Expand Down Expand Up @@ -513,7 +513,7 @@ declare_features! (
/// 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.
(unstable, diagnostic_on_unmatch_args, "CURRENT_RUSTC_VERSION", Some(155642)),
(unstable, diagnostic_on_unmatch_args, "1.97.0", Some(155642)),
/// Allows `#[doc(cfg(...))]`.
(unstable, doc_cfg, "1.21.0", Some(43781)),
/// Allows `#[doc(masked)]`.
Expand Down Expand Up @@ -549,7 +549,7 @@ declare_features! (
/// Allows marking trait functions as `final` to prevent overriding impls
(unstable, final_associated_functions, "1.95.0", Some(131179)),
/// fma4 target feature on x86.
(unstable, fma4_target_feature, "CURRENT_RUSTC_VERSION", Some(155233)),
(unstable, fma4_target_feature, "1.97.0", Some(155233)),
/// Controlling the behavior of fmt::Debug
(unstable, fmt_debug, "1.82.0", Some(129709)),
/// Allows using `#[align(...)]` on function items
Expand Down Expand Up @@ -582,7 +582,7 @@ declare_features! (
/// Target features on hexagon.
(unstable, hexagon_target_feature, "1.27.0", Some(150250)),
/// Allows `impl(crate) trait Foo` restrictions.
(unstable, impl_restriction, "CURRENT_RUSTC_VERSION", Some(105077)),
(unstable, impl_restriction, "1.97.0", Some(105077)),
/// Allows `impl Trait` to be used inside associated types (RFC 2515).
(unstable, impl_trait_in_assoc_type, "1.70.0", Some(63063)),
/// Allows `impl Trait` in bindings (`let`).
Expand Down Expand Up @@ -639,7 +639,7 @@ declare_features! (
/// Allows qualified paths in struct expressions, struct patterns and tuple struct patterns.
(unstable, more_qualified_paths, "1.54.0", Some(86935)),
/// Allows `move(expr)` in closures.
(incomplete, move_expr, "CURRENT_RUSTC_VERSION", Some(155050)),
(incomplete, move_expr, "1.97.0", Some(155050)),
/// The `movrs` target feature on x86.
(unstable, movrs_target_feature, "1.88.0", Some(137976)),
/// Allows the `multiple_supertrait_upcastable` lint.
Expand Down Expand Up @@ -760,7 +760,7 @@ declare_features! (
/// Allows using the `#[used(linker)]` (or `#[used(compiler)]`) attribute.
(unstable, used_with_arg, "1.60.0", Some(93798)),
/// Allows view types.
(unstable, view_types, "CURRENT_RUSTC_VERSION", Some(155938)),
(unstable, view_types, "1.97.0", Some(155938)),
/// Target features on wasm.
(unstable, wasm_target_feature, "1.30.0", Some(150260)),
/// Allows use of attributes in `where` clauses.
Expand Down
5 changes: 2 additions & 3 deletions compiler/rustc_lint_defs/src/builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5453,16 +5453,15 @@ declare_lint! {
///
/// ### Example
///
#[cfg_attr(bootstrap, doc = "```rust")]
#[cfg_attr(not(bootstrap), doc = "```rust,compile_fail")]
/// ```rust,compile_fail
/// // Using `...` in non-foreign function definitions is unstable, however stability is
/// // currently only checked after attributes are expanded, so using `#[cfg(false)]` here will
/// // allow this to compile on stable Rust.
/// #[cfg(false)]
/// fn foo(...) {
///
/// }
#[doc = "```"]
/// ```
///
/// {{produces}}
///
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_middle/src/middle/codegen_fn_attrs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ pub struct SanitizerFnAttrs {
pub rtsan_setting: RtsanSetting,
}

impl const Default for SanitizerFnAttrs {
const impl Default for SanitizerFnAttrs {
fn default() -> Self {
Self { disabled: SanitizerSet::empty(), rtsan_setting: RtsanSetting::default() }
}
Expand Down
2 changes: 1 addition & 1 deletion library/alloc/src/alloc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ impl Global {

#[unstable(feature = "allocator_api", issue = "32838")]
#[rustc_const_unstable(feature = "const_heap", issue = "79597")]
unsafe impl const Allocator for Global {
const unsafe impl Allocator for Global {
#[inline]
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
fn allocate(&self, layout: Layout) -> Result<NonNull<[u8]>, AllocError> {
Expand Down
6 changes: 3 additions & 3 deletions library/alloc/src/collections/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ pub enum TryReserveErrorKind {
)]
#[rustc_const_unstable(feature = "const_heap", issue = "79597")]
#[cfg(not(test))]
impl const Clone for TryReserveErrorKind {
const impl Clone for TryReserveErrorKind {
fn clone(&self) -> Self {
match self {
TryReserveErrorKind::CapacityOverflow => TryReserveErrorKind::CapacityOverflow,
Expand All @@ -150,7 +150,7 @@ pub use realalloc::collections::TryReserveErrorKind;
)]
#[rustc_const_unstable(feature = "const_convert", issue = "143773")]
#[cfg(not(test))]
impl const From<TryReserveErrorKind> for TryReserveError {
const impl From<TryReserveErrorKind> for TryReserveError {
#[inline]
fn from(kind: TryReserveErrorKind) -> Self {
Self { kind }
Expand All @@ -160,7 +160,7 @@ impl const From<TryReserveErrorKind> for TryReserveError {
#[unstable(feature = "try_reserve_kind", issue = "48043")]
#[rustc_const_unstable(feature = "const_convert", issue = "143773")]
#[cfg(not(test))]
impl const From<LayoutError> for TryReserveErrorKind {
const impl From<LayoutError> for TryReserveErrorKind {
/// Always evaluates to [`TryReserveErrorKind::CapacityOverflow`].
#[inline]
fn from(_: LayoutError) -> Self {
Expand Down
2 changes: 1 addition & 1 deletion library/alloc/src/string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2710,7 +2710,7 @@ impl_eq! { Cow<'_, str>, String }

#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_default", issue = "143894")]
impl const Default for String {
const impl Default for String {
/// Creates an empty `String`.
#[inline]
fn default() -> String {
Expand Down
10 changes: 5 additions & 5 deletions library/alloc/src/vec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3786,7 +3786,7 @@ impl<T: TrivialClone, A: Allocator> ExtendFromWithinSpec for Vec<T, A> {

#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_convert", issue = "143773")]
impl<T, A: Allocator> const ops::Deref for Vec<T, A> {
const impl<T, A: Allocator> ops::Deref for Vec<T, A> {
type Target = [T];

#[inline]
Expand All @@ -3797,7 +3797,7 @@ impl<T, A: Allocator> const ops::Deref for Vec<T, A> {

#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_convert", issue = "143773")]
impl<T, A: Allocator> const ops::DerefMut for Vec<T, A> {
const impl<T, A: Allocator> ops::DerefMut for Vec<T, A> {
#[inline]
fn deref_mut(&mut self) -> &mut [T] {
self.as_mut_slice()
Expand Down Expand Up @@ -3863,7 +3863,7 @@ impl<T: Hash, A: Allocator> Hash for Vec<T, A> {

#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_index", issue = "143775")]
impl<T, I: [const] SliceIndex<[T]>, A: Allocator> const Index<I> for Vec<T, A> {
const impl<T, I: [const] SliceIndex<[T]>, A: Allocator> Index<I> for Vec<T, A> {
type Output = I::Output;

#[inline]
Expand All @@ -3874,7 +3874,7 @@ impl<T, I: [const] SliceIndex<[T]>, A: Allocator> const Index<I> for Vec<T, A> {

#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_index", issue = "143775")]
impl<T, I: [const] SliceIndex<[T]>, A: Allocator> const IndexMut<I> for Vec<T, A> {
const impl<T, I: [const] SliceIndex<[T]>, A: Allocator> IndexMut<I> for Vec<T, A> {
#[inline]
fn index_mut(&mut self, index: I) -> &mut Self::Output {
IndexMut::index_mut(&mut **self, index)
Expand Down Expand Up @@ -4297,7 +4297,7 @@ unsafe impl<#[may_dangle] T, A: Allocator> Drop for Vec<T, A> {

#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_default", issue = "143894")]
impl<T> const Default for Vec<T> {
const impl<T> Default for Vec<T> {
/// Creates an empty `Vec<T>`.
///
/// The vector will not allocate until elements are pushed onto it.
Expand Down
2 changes: 1 addition & 1 deletion library/core/src/alloc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ pub const unsafe trait Allocator {

#[unstable(feature = "allocator_api", issue = "32838")]
#[rustc_const_unstable(feature = "const_heap", issue = "79597")]
unsafe impl<A> const Allocator for &A
const unsafe impl<A> Allocator for &A
where
A: [const] Allocator + ?Sized,
{
Expand Down
2 changes: 1 addition & 1 deletion library/core/src/any.rs
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,7 @@ unsafe impl Sync for TypeId {}

#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_cmp", issue = "143800")]
impl const PartialEq for TypeId {
const impl PartialEq for TypeId {
#[inline]
fn eq(&self, other: &Self) -> bool {
#[cfg(miri)]
Expand Down
6 changes: 3 additions & 3 deletions library/core/src/array/drain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ pub(super) struct Drain<'l, 'f, T, F> {

#[rustc_const_unstable(feature = "array_try_map", issue = "79711")]
#[unstable(feature = "array_try_map", issue = "79711")]
impl<T, U, F> const FnOnce<(usize,)> for &mut Drain<'_, '_, T, F>
const impl<T, U, F> FnOnce<(usize,)> for &mut Drain<'_, '_, T, F>
where
F: [const] FnMut(T) -> U,
{
Expand All @@ -65,7 +65,7 @@ where
}
#[rustc_const_unstable(feature = "array_try_map", issue = "79711")]
#[unstable(feature = "array_try_map", issue = "79711")]
impl<T, U, F> const FnMut<(usize,)> for &mut Drain<'_, '_, T, F>
const impl<T, U, F> FnMut<(usize,)> for &mut Drain<'_, '_, T, F>
where
F: [const] FnMut(T) -> U,
{
Expand Down Expand Up @@ -100,7 +100,7 @@ where
}
#[rustc_const_unstable(feature = "array_try_map", issue = "79711")]
#[unstable(feature = "array_try_map", issue = "79711")]
impl<T: [const] Destruct, F> const Drop for Drain<'_, '_, T, F> {
const impl<T: [const] Destruct, F> Drop for Drain<'_, '_, T, F> {
fn drop(&mut self) {
let slice = if T::IS_ZST {
from_raw_parts_mut::<[T]>(
Expand Down
20 changes: 10 additions & 10 deletions library/core/src/array/equality.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use crate::cmp::BytewiseEq;

#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_cmp", issue = "143800")]
impl<T, U, const N: usize> const PartialEq<[U; N]> for [T; N]
const impl<T, U, const N: usize> PartialEq<[U; N]> for [T; N]
where
T: [const] PartialEq<U>,
{
Expand All @@ -18,7 +18,7 @@ where

#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_cmp", issue = "143800")]
impl<T, U, const N: usize> const PartialEq<[U]> for [T; N]
const impl<T, U, const N: usize> PartialEq<[U]> for [T; N]
where
T: [const] PartialEq<U>,
{
Expand All @@ -40,7 +40,7 @@ where

#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_cmp", issue = "143800")]
impl<T, U, const N: usize> const PartialEq<[U; N]> for [T]
const impl<T, U, const N: usize> PartialEq<[U; N]> for [T]
where
T: [const] PartialEq<U>,
{
Expand All @@ -62,7 +62,7 @@ where

#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_cmp", issue = "143800")]
impl<T, U, const N: usize> const PartialEq<&[U]> for [T; N]
const impl<T, U, const N: usize> PartialEq<&[U]> for [T; N]
where
T: [const] PartialEq<U>,
{
Expand All @@ -78,7 +78,7 @@ where

#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_cmp", issue = "143800")]
impl<T, U, const N: usize> const PartialEq<[U; N]> for &[T]
const impl<T, U, const N: usize> PartialEq<[U; N]> for &[T]
where
T: [const] PartialEq<U>,
{
Expand All @@ -94,7 +94,7 @@ where

#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_cmp", issue = "143800")]
impl<T, U, const N: usize> const PartialEq<&mut [U]> for [T; N]
const impl<T, U, const N: usize> PartialEq<&mut [U]> for [T; N]
where
T: [const] PartialEq<U>,
{
Expand All @@ -110,7 +110,7 @@ where

#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_cmp", issue = "143800")]
impl<T, U, const N: usize> const PartialEq<[U; N]> for &mut [T]
const impl<T, U, const N: usize> PartialEq<[U; N]> for &mut [T]
where
T: [const] PartialEq<U>,
{
Expand All @@ -130,7 +130,7 @@ where

#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_cmp", issue = "143800")]
impl<T: [const] Eq, const N: usize> const Eq for [T; N] {}
const impl<T: [const] Eq, const N: usize> Eq for [T; N] {}

#[rustc_const_unstable(feature = "const_cmp", issue = "143800")]
const trait SpecArrayEq<Other, const N: usize>: Sized {
Expand All @@ -139,7 +139,7 @@ const trait SpecArrayEq<Other, const N: usize>: Sized {
}

#[rustc_const_unstable(feature = "const_cmp", issue = "143800")]
impl<T: [const] PartialEq<Other>, Other, const N: usize> const SpecArrayEq<Other, N> for T {
const impl<T: [const] PartialEq<Other>, Other, const N: usize> SpecArrayEq<Other, N> for T {
default fn spec_eq(a: &[Self; N], b: &[Other; N]) -> bool {
a[..] == b[..]
}
Expand All @@ -149,7 +149,7 @@ impl<T: [const] PartialEq<Other>, Other, const N: usize> const SpecArrayEq<Other
}

#[rustc_const_unstable(feature = "const_cmp", issue = "143800")]
impl<T: [const] BytewiseEq<U>, U, const N: usize> const SpecArrayEq<U, N> for T {
const impl<T: [const] BytewiseEq<U>, U, const N: usize> SpecArrayEq<U, N> for T {
fn spec_eq(a: &[T; N], b: &[U; N]) -> bool {
// SAFETY: Arrays are compared element-wise, and don't add any padding
// between elements, so when the elements are `BytewiseEq`, we can
Expand Down
Loading
Loading