Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 495203b

Browse files
committedDec 23, 2023
Auto merge of rust-lang#119211 - rust-lang:pa-master-1.77, r=Mark-Simulacrum
Bump stage0 to 1.76 beta r? `@Mark-Simulacrum`
2 parents 467d1d9 + f9f5840 commit 495203b

File tree

27 files changed

+455
-885
lines changed

27 files changed

+455
-885
lines changed
 

‎compiler/rustc_codegen_cranelift/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#![cfg_attr(all(doc, not(bootstrap)), allow(internal_features))]
2-
#![cfg_attr(all(doc, not(bootstrap)), feature(rustdoc_internals))]
3-
#![cfg_attr(all(doc, not(bootstrap)), doc(rust_logo))]
1+
#![cfg_attr(doc, allow(internal_features))]
2+
#![cfg_attr(doc, feature(rustdoc_internals))]
3+
#![cfg_attr(doc, doc(rust_logo))]
44
#![feature(rustc_private)]
55
// Note: please avoid adding other feature gates where possible
66
#![warn(rust_2018_idioms)]

‎compiler/rustc_codegen_llvm/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
#![feature(rustdoc_internals)]
99
#![doc(rust_logo)]
1010
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
11-
#![cfg_attr(bootstrap, feature(c_str_literals))]
1211
#![feature(exact_size_is_empty)]
1312
#![feature(extern_types)]
1413
#![feature(hash_raw_entry)]

‎compiler/rustc_data_structures/src/tagged_ptr/impl_tag.rs

Lines changed: 0 additions & 144 deletions
Original file line numberDiff line numberDiff line change
@@ -81,150 +81,6 @@
8181
/// E::A,
8282
/// }
8383
/// ```
84-
#[cfg(bootstrap)]
85-
#[macro_export]
86-
macro_rules! impl_tag {
87-
(
88-
impl Tag for $Self:ty;
89-
$(
90-
$($path:ident)::* $( { $( $fields:tt )* })?,
91-
)*
92-
) => {
93-
// Safety:
94-
// `bits_for_tags` is called on the same `${index()}`-es as
95-
// `into_usize` returns, thus `BITS` constant is correct.
96-
unsafe impl $crate::tagged_ptr::Tag for $Self {
97-
const BITS: u32 = $crate::tagged_ptr::bits_for_tags(&[
98-
$(
99-
${index()},
100-
$( ${ignore(path)} )*
101-
)*
102-
]);
103-
104-
#[inline]
105-
fn into_usize(self) -> usize {
106-
// This forbids use of repeating patterns (`Enum::V`&`Enum::V`, etc)
107-
// (or at least it should, see <https://github.com/rust-lang/rust/issues/110613>)
108-
#[forbid(unreachable_patterns)]
109-
match self {
110-
// `match` is doing heavy lifting here, by requiring exhaustiveness
111-
$(
112-
$($path)::* $( { $( $fields )* } )? => ${index()},
113-
)*
114-
}
115-
}
116-
117-
#[inline]
118-
unsafe fn from_usize(tag: usize) -> Self {
119-
match tag {
120-
$(
121-
${index()} => $($path)::* $( { $( $fields )* } )?,
122-
)*
123-
124-
// Safety:
125-
// `into_usize` only returns `${index()}` of the same
126-
// repetition as we are filtering above, thus if this is
127-
// reached, the safety contract of this function was
128-
// already breached.
129-
_ => unsafe {
130-
debug_assert!(
131-
false,
132-
"invalid tag: {tag}\
133-
(this is a bug in the caller of `from_usize`)"
134-
);
135-
std::hint::unreachable_unchecked()
136-
},
137-
}
138-
}
139-
140-
}
141-
};
142-
}
143-
144-
/// Implements [`Tag`] for a given type.
145-
///
146-
/// You can use `impl_tag` on structs and enums.
147-
/// You need to specify the type and all its possible values,
148-
/// which can only be paths with optional fields.
149-
///
150-
/// [`Tag`]: crate::tagged_ptr::Tag
151-
///
152-
/// # Examples
153-
///
154-
/// Basic usage:
155-
///
156-
/// ```
157-
/// #![feature(macro_metavar_expr)]
158-
/// use rustc_data_structures::{impl_tag, tagged_ptr::Tag};
159-
///
160-
/// #[derive(Copy, Clone, PartialEq, Debug)]
161-
/// enum SomeTag {
162-
/// A,
163-
/// B,
164-
/// X { v: bool },
165-
/// Y(bool, bool),
166-
/// }
167-
///
168-
/// impl_tag! {
169-
/// // The type for which the `Tag` will be implemented
170-
/// impl Tag for SomeTag;
171-
/// // You need to specify all possible tag values:
172-
/// SomeTag::A, // 0
173-
/// SomeTag::B, // 1
174-
/// // For variants with fields, you need to specify the fields:
175-
/// SomeTag::X { v: true }, // 2
176-
/// SomeTag::X { v: false }, // 3
177-
/// // For tuple variants use named syntax:
178-
/// SomeTag::Y { 0: true, 1: true }, // 4
179-
/// SomeTag::Y { 0: false, 1: true }, // 5
180-
/// SomeTag::Y { 0: true, 1: false }, // 6
181-
/// SomeTag::Y { 0: false, 1: false }, // 7
182-
/// }
183-
///
184-
/// // Tag values are assigned in order:
185-
/// assert_eq!(SomeTag::A.into_usize(), 0);
186-
/// assert_eq!(SomeTag::X { v: false }.into_usize(), 3);
187-
/// assert_eq!(SomeTag::Y(false, true).into_usize(), 5);
188-
///
189-
/// assert_eq!(unsafe { SomeTag::from_usize(1) }, SomeTag::B);
190-
/// assert_eq!(unsafe { SomeTag::from_usize(2) }, SomeTag::X { v: true });
191-
/// assert_eq!(unsafe { SomeTag::from_usize(7) }, SomeTag::Y(false, false));
192-
/// ```
193-
///
194-
/// Structs are supported:
195-
///
196-
/// ```
197-
/// #![feature(macro_metavar_expr)]
198-
/// # use rustc_data_structures::impl_tag;
199-
/// #[derive(Copy, Clone)]
200-
/// struct Flags { a: bool, b: bool }
201-
///
202-
/// impl_tag! {
203-
/// impl Tag for Flags;
204-
/// Flags { a: true, b: true },
205-
/// Flags { a: false, b: true },
206-
/// Flags { a: true, b: false },
207-
/// Flags { a: false, b: false },
208-
/// }
209-
/// ```
210-
///
211-
/// Not specifying all values results in a compile error:
212-
///
213-
/// ```compile_fail,E0004
214-
/// #![feature(macro_metavar_expr)]
215-
/// # use rustc_data_structures::impl_tag;
216-
/// #[derive(Copy, Clone)]
217-
/// enum E {
218-
/// A,
219-
/// B,
220-
/// }
221-
///
222-
/// impl_tag! {
223-
/// impl Tag for E;
224-
/// E::A,
225-
/// }
226-
/// ```
227-
#[cfg(not(bootstrap))]
22884
#[macro_export]
22985
macro_rules! impl_tag {
23086
(

‎compiler/rustc_expand/src/expand.rs

Lines changed: 0 additions & 126 deletions
Original file line numberDiff line numberDiff line change
@@ -41,132 +41,6 @@ use std::path::PathBuf;
4141
use std::rc::Rc;
4242
use std::{iter, mem};
4343

44-
#[cfg(bootstrap)]
45-
macro_rules! ast_fragments {
46-
(
47-
$($Kind:ident($AstTy:ty) {
48-
$kind_name:expr;
49-
$(one fn $mut_visit_ast:ident; fn $visit_ast:ident;)?
50-
$(many fn $flat_map_ast_elt:ident; fn $visit_ast_elt:ident($($args:tt)*);)?
51-
fn $make_ast:ident;
52-
})*
53-
) => {
54-
/// A fragment of AST that can be produced by a single macro expansion.
55-
/// Can also serve as an input and intermediate result for macro expansion operations.
56-
pub enum AstFragment {
57-
OptExpr(Option<P<ast::Expr>>),
58-
MethodReceiverExpr(P<ast::Expr>),
59-
$($Kind($AstTy),)*
60-
}
61-
62-
/// "Discriminant" of an AST fragment.
63-
#[derive(Copy, Clone, PartialEq, Eq)]
64-
pub enum AstFragmentKind {
65-
OptExpr,
66-
MethodReceiverExpr,
67-
$($Kind,)*
68-
}
69-
70-
impl AstFragmentKind {
71-
pub fn name(self) -> &'static str {
72-
match self {
73-
AstFragmentKind::OptExpr => "expression",
74-
AstFragmentKind::MethodReceiverExpr => "expression",
75-
$(AstFragmentKind::$Kind => $kind_name,)*
76-
}
77-
}
78-
79-
fn make_from<'a>(self, result: Box<dyn MacResult + 'a>) -> Option<AstFragment> {
80-
match self {
81-
AstFragmentKind::OptExpr =>
82-
result.make_expr().map(Some).map(AstFragment::OptExpr),
83-
AstFragmentKind::MethodReceiverExpr =>
84-
result.make_expr().map(AstFragment::MethodReceiverExpr),
85-
$(AstFragmentKind::$Kind => result.$make_ast().map(AstFragment::$Kind),)*
86-
}
87-
}
88-
}
89-
90-
impl AstFragment {
91-
pub fn add_placeholders(&mut self, placeholders: &[NodeId]) {
92-
if placeholders.is_empty() {
93-
return;
94-
}
95-
match self {
96-
$($(AstFragment::$Kind(ast) => ast.extend(placeholders.iter().flat_map(|id| {
97-
${ignore(flat_map_ast_elt)}
98-
placeholder(AstFragmentKind::$Kind, *id, None).$make_ast()
99-
})),)?)*
100-
_ => panic!("unexpected AST fragment kind")
101-
}
102-
}
103-
104-
pub fn make_opt_expr(self) -> Option<P<ast::Expr>> {
105-
match self {
106-
AstFragment::OptExpr(expr) => expr,
107-
_ => panic!("AstFragment::make_* called on the wrong kind of fragment"),
108-
}
109-
}
110-
111-
pub fn make_method_receiver_expr(self) -> P<ast::Expr> {
112-
match self {
113-
AstFragment::MethodReceiverExpr(expr) => expr,
114-
_ => panic!("AstFragment::make_* called on the wrong kind of fragment"),
115-
}
116-
}
117-
118-
$(pub fn $make_ast(self) -> $AstTy {
119-
match self {
120-
AstFragment::$Kind(ast) => ast,
121-
_ => panic!("AstFragment::make_* called on the wrong kind of fragment"),
122-
}
123-
})*
124-
125-
fn make_ast<T: InvocationCollectorNode>(self) -> T::OutputTy {
126-
T::fragment_to_output(self)
127-
}
128-
129-
pub fn mut_visit_with<F: MutVisitor>(&mut self, vis: &mut F) {
130-
match self {
131-
AstFragment::OptExpr(opt_expr) => {
132-
visit_clobber(opt_expr, |opt_expr| {
133-
if let Some(expr) = opt_expr {
134-
vis.filter_map_expr(expr)
135-
} else {
136-
None
137-
}
138-
});
139-
}
140-
AstFragment::MethodReceiverExpr(expr) => vis.visit_method_receiver_expr(expr),
141-
$($(AstFragment::$Kind(ast) => vis.$mut_visit_ast(ast),)?)*
142-
$($(AstFragment::$Kind(ast) =>
143-
ast.flat_map_in_place(|ast| vis.$flat_map_ast_elt(ast)),)?)*
144-
}
145-
}
146-
147-
pub fn visit_with<'a, V: Visitor<'a>>(&'a self, visitor: &mut V) {
148-
match self {
149-
AstFragment::OptExpr(Some(expr)) => visitor.visit_expr(expr),
150-
AstFragment::OptExpr(None) => {}
151-
AstFragment::MethodReceiverExpr(expr) => visitor.visit_method_receiver_expr(expr),
152-
$($(AstFragment::$Kind(ast) => visitor.$visit_ast(ast),)?)*
153-
$($(AstFragment::$Kind(ast) => for ast_elt in &ast[..] {
154-
visitor.$visit_ast_elt(ast_elt, $($args)*);
155-
})?)*
156-
}
157-
}
158-
}
159-
160-
impl<'a> MacResult for crate::mbe::macro_rules::ParserAnyMacro<'a> {
161-
$(fn $make_ast(self: Box<crate::mbe::macro_rules::ParserAnyMacro<'a>>)
162-
-> Option<$AstTy> {
163-
Some(self.make(AstFragmentKind::$Kind).$make_ast())
164-
})*
165-
}
166-
}
167-
}
168-
169-
#[cfg(not(bootstrap))]
17044
macro_rules! ast_fragments {
17145
(
17246
$($Kind:ident($AstTy:ty) {

‎compiler/rustc_feature/src/accepted.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ declare_features! (
7777
/// Allows empty structs and enum variants with braces.
7878
(accepted, braced_empty_structs, "1.8.0", Some(29720)),
7979
/// Allows `c"foo"` literals.
80-
(accepted, c_str_literals, "CURRENT_RUSTC_VERSION", Some(105723)),
80+
(accepted, c_str_literals, "1.76.0", Some(105723)),
8181
/// Allows `#[cfg_attr(predicate, multiple, attributes, here)]`.
8282
(accepted, cfg_attr_multi, "1.33.0", Some(54881)),
8383
/// Allows the use of `#[cfg(doctest)]`, set when rustdoc is collecting doctests.
@@ -341,7 +341,7 @@ declare_features! (
341341
(accepted, track_caller, "1.46.0", Some(47809)),
342342
/// Allows dyn upcasting trait objects via supertraits.
343343
/// Dyn upcasting is casting, e.g., `dyn Foo -> dyn Bar` where `Foo: Bar`.
344-
(accepted, trait_upcasting, "CURRENT_RUSTC_VERSION", Some(65991)),
344+
(accepted, trait_upcasting, "1.76.0", Some(65991)),
345345
/// Allows #[repr(transparent)] on univariant enums (RFC 2645).
346346
(accepted, transparent_enums, "1.42.0", Some(60405)),
347347
/// Allows indexing tuples.

‎compiler/rustc_feature/src/removed.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ declare_features! (
177177
/// Allows using the `#[register_attr]` attribute.
178178
(removed, register_attr, "1.65.0", Some(66080),
179179
Some("removed in favor of `#![register_tool]`")),
180-
(removed, rust_2018_preview, "CURRENT_RUSTC_VERSION", None,
180+
(removed, rust_2018_preview, "1.76.0", None,
181181
Some("2018 Edition preview is no longer relevant")),
182182
/// Allows using the macros:
183183
/// + `__diagnostic_used`

‎compiler/rustc_feature/src/unstable.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ declare_features! (
204204
/// Allows using `#[lang = ".."]` attribute for linking items to special compiler logic.
205205
(internal, lang_items, "1.0.0", None),
206206
/// Changes `impl Trait` to capture all lifetimes in scope.
207-
(unstable, lifetime_capture_rules_2024, "CURRENT_RUSTC_VERSION", None),
207+
(unstable, lifetime_capture_rules_2024, "1.76.0", None),
208208
/// Allows `#[link(..., cfg(..))]`; perma-unstable per #37406
209209
(unstable, link_cfg, "1.14.0", None),
210210
/// Allows the `multiple_supertrait_upcastable` lint.
@@ -470,7 +470,7 @@ declare_features! (
470470
/// Allows using `#[repr(align(...))]` on function items
471471
(unstable, fn_align, "1.53.0", Some(82232)),
472472
/// Support delegating implementation of functions to other already implemented functions.
473-
(incomplete, fn_delegation, "CURRENT_RUSTC_VERSION", Some(118212)),
473+
(incomplete, fn_delegation, "1.76.0", Some(118212)),
474474
/// Allows defining gen blocks and `gen fn`.
475475
(unstable, gen_blocks, "1.75.0", Some(117078)),
476476
/// Infer generic args for both consts and types.
@@ -507,7 +507,7 @@ declare_features! (
507507
(unstable, let_chains, "1.37.0", Some(53667)),
508508
/// Allows using `#[link(kind = "link-arg", name = "...")]`
509509
/// to pass custom arguments to the linker.
510-
(unstable, link_arg_attribute, "CURRENT_RUSTC_VERSION", Some(99427)),
510+
(unstable, link_arg_attribute, "1.76.0", Some(99427)),
511511
/// Allows using `reason` in lint attributes and the `#[expect(lint)]` lint check.
512512
(unstable, lint_reasons, "1.31.0", Some(54503)),
513513
/// Give access to additional metadata about declarative macro meta-variables.
@@ -529,7 +529,7 @@ declare_features! (
529529
/// Allow negative trait implementations.
530530
(unstable, negative_impls, "1.44.0", Some(68318)),
531531
/// Allows the `!` pattern.
532-
(incomplete, never_patterns, "CURRENT_RUSTC_VERSION", Some(118155)),
532+
(incomplete, never_patterns, "1.76.0", Some(118155)),
533533
/// Allows the `!` type. Does not imply 'exhaustive_patterns' (below) any more.
534534
(unstable, never_type, "1.13.0", Some(35121)),
535535
/// Allows diverging expressions to fall back to `!` rather than `()`.

‎compiler/rustc_lint/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
#![feature(min_specialization)]
4040
#![feature(never_type)]
4141
#![feature(rustc_attrs)]
42-
#![cfg_attr(bootstrap, feature(trait_upcasting))]
4342
#![recursion_limit = "256"]
4443
#![deny(rustc::untranslatable_diagnostic)]
4544
#![deny(rustc::diagnostic_outside_of_impl)]

‎compiler/rustc_middle/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@
4949
#![feature(associated_type_bounds)]
5050
#![feature(rustc_attrs)]
5151
#![feature(control_flow_enum)]
52-
#![cfg_attr(bootstrap, feature(trait_upcasting))]
5352
#![feature(trusted_step)]
5453
#![feature(try_blocks)]
5554
#![feature(try_reserve_kind)]

‎library/alloc/src/rc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1768,7 +1768,7 @@ impl<T: Clone, A: Allocator + Clone> Rc<T, A> {
17681768
/// assert!(ptr::eq(ptr, inner.as_ptr()));
17691769
/// ```
17701770
#[inline]
1771-
#[stable(feature = "arc_unwrap_or_clone", since = "CURRENT_RUSTC_VERSION")]
1771+
#[stable(feature = "arc_unwrap_or_clone", since = "1.76.0")]
17721772
pub fn unwrap_or_clone(this: Self) -> T {
17731773
Rc::try_unwrap(this).unwrap_or_else(|rc| (*rc).clone())
17741774
}

‎library/alloc/src/sync.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2194,7 +2194,7 @@ impl<T: Clone, A: Allocator + Clone> Arc<T, A> {
21942194
/// assert!(ptr::eq(ptr, inner.as_ptr()));
21952195
/// ```
21962196
#[inline]
2197-
#[stable(feature = "arc_unwrap_or_clone", since = "CURRENT_RUSTC_VERSION")]
2197+
#[stable(feature = "arc_unwrap_or_clone", since = "1.76.0")]
21982198
pub fn unwrap_or_clone(this: Self) -> T {
21992199
Arc::try_unwrap(this).unwrap_or_else(|arc| (*arc).clone())
22002200
}

‎library/core/src/any.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -729,7 +729,7 @@ pub const fn type_name<T: ?Sized>() -> &'static str {
729729
/// assert!(type_name_of_val(&y).contains("f32"));
730730
/// ```
731731
#[must_use]
732-
#[stable(feature = "type_name_of_val", since = "CURRENT_RUSTC_VERSION")]
732+
#[stable(feature = "type_name_of_val", since = "1.76.0")]
733733
#[rustc_const_unstable(feature = "const_type_name", issue = "63084")]
734734
pub const fn type_name_of_val<T: ?Sized>(_val: &T) -> &'static str {
735735
type_name::<T>()

‎library/core/src/async_iter/async_iter.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use crate::task::{Context, Poll};
1313
#[unstable(feature = "async_iterator", issue = "79024")]
1414
#[must_use = "async iterators do nothing unless polled"]
1515
#[doc(alias = "Stream")]
16-
#[cfg_attr(not(bootstrap), lang = "async_iterator")]
16+
#[lang = "async_iterator"]
1717
pub trait AsyncIterator {
1818
/// The type of items yielded by the async iterator.
1919
type Item;
@@ -117,21 +117,21 @@ impl<T> Poll<Option<T>> {
117117
/// A helper function for internal desugaring -- produces `Ready(Some(t))`,
118118
/// which corresponds to the async iterator yielding a value.
119119
#[unstable(feature = "async_gen_internals", issue = "none")]
120-
#[cfg_attr(not(bootstrap), lang = "AsyncGenReady")]
120+
#[lang = "AsyncGenReady"]
121121
pub fn async_gen_ready(t: T) -> Self {
122122
Poll::Ready(Some(t))
123123
}
124124

125125
/// A helper constant for internal desugaring -- produces `Pending`,
126126
/// which corresponds to the async iterator pending on an `.await`.
127127
#[unstable(feature = "async_gen_internals", issue = "none")]
128-
#[cfg_attr(not(bootstrap), lang = "AsyncGenPending")]
128+
#[lang = "AsyncGenPending"]
129129
// FIXME(gen_blocks): This probably could be deduplicated.
130130
pub const PENDING: Self = Poll::Pending;
131131

132132
/// A helper constant for internal desugaring -- produces `Ready(None)`,
133133
/// which corresponds to the async iterator finishing its iteration.
134134
#[unstable(feature = "async_gen_internals", issue = "none")]
135-
#[cfg_attr(not(bootstrap), lang = "AsyncGenFinished")]
135+
#[lang = "AsyncGenFinished"]
136136
pub const FINISHED: Self = Poll::Ready(None);
137137
}

‎library/core/src/cmp.rs

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -224,21 +224,21 @@ use self::Ordering::*;
224224
append_const_msg
225225
)]
226226
#[rustc_diagnostic_item = "PartialEq"]
227-
#[cfg_attr(not(bootstrap), const_trait)]
227+
#[const_trait]
228228
pub trait PartialEq<Rhs: ?Sized = Self> {
229229
/// This method tests for `self` and `other` values to be equal, and is used
230230
/// by `==`.
231231
#[must_use]
232232
#[stable(feature = "rust1", since = "1.0.0")]
233-
#[cfg_attr(not(bootstrap), rustc_diagnostic_item = "cmp_partialeq_eq")]
233+
#[rustc_diagnostic_item = "cmp_partialeq_eq"]
234234
fn eq(&self, other: &Rhs) -> bool;
235235

236236
/// This method tests for `!=`. The default implementation is almost always
237237
/// sufficient, and should not be overridden without very good reason.
238238
#[inline]
239239
#[must_use]
240240
#[stable(feature = "rust1", since = "1.0.0")]
241-
#[cfg_attr(not(bootstrap), rustc_diagnostic_item = "cmp_partialeq_ne")]
241+
#[rustc_diagnostic_item = "cmp_partialeq_ne"]
242242
fn ne(&self, other: &Rhs) -> bool {
243243
!self.eq(other)
244244
}
@@ -1416,18 +1416,8 @@ mod impls {
14161416

14171417
macro_rules! partial_eq_impl {
14181418
($($t:ty)*) => ($(
1419-
#[stable(feature = "rust1", since = "1.0.0")]
1420-
#[cfg(bootstrap)]
1421-
impl PartialEq for $t {
1422-
#[inline]
1423-
fn eq(&self, other: &$t) -> bool { (*self) == (*other) }
1424-
#[inline]
1425-
fn ne(&self, other: &$t) -> bool { (*self) != (*other) }
1426-
}
1427-
14281419
#[stable(feature = "rust1", since = "1.0.0")]
14291420
#[rustc_const_unstable(feature = "const_cmp", issue = "92391")]
1430-
#[cfg(not(bootstrap))]
14311421
impl const PartialEq for $t {
14321422
#[inline]
14331423
fn eq(&self, other: &$t) -> bool { (*self) == (*other) }

‎library/core/src/intrinsics/simd.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,6 @@ extern "platform-intrinsic" {
257257
/// type).
258258
///
259259
/// `mask` must only contain `0` or `!0` values.
260-
#[cfg(not(bootstrap))]
261260
pub fn simd_masked_load<V, U, T>(mask: V, ptr: U, val: T) -> T;
262261

263262
/// Write to a vector of pointers.
@@ -277,7 +276,6 @@ extern "platform-intrinsic" {
277276
/// type).
278277
///
279278
/// `mask` must only contain `0` or `!0` values.
280-
#[cfg(not(bootstrap))]
281279
pub fn simd_masked_store<V, U, T>(mask: V, ptr: U, val: T);
282280

283281
/// Add two simd vectors elementwise, with saturation.

‎library/core/src/option.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1088,7 +1088,7 @@ impl<T> Option<T> {
10881088
/// let x: Option<&usize> = v.get(5).inspect(|x| println!("got: {x}"));
10891089
/// ```
10901090
#[inline]
1091-
#[stable(feature = "result_option_inspect", since = "CURRENT_RUSTC_VERSION")]
1091+
#[stable(feature = "result_option_inspect", since = "1.76.0")]
10921092
pub fn inspect<F: FnOnce(&T)>(self, f: F) -> Self {
10931093
if let Some(ref x) = self {
10941094
f(x);

‎library/core/src/ptr/const_ptr.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1772,7 +1772,7 @@ impl<T> *const [T] {
17721772
#[stable(feature = "rust1", since = "1.0.0")]
17731773
impl<T: ?Sized> PartialEq for *const T {
17741774
#[inline]
1775-
#[cfg_attr(not(bootstrap), allow(ambiguous_wide_pointer_comparisons))]
1775+
#[allow(ambiguous_wide_pointer_comparisons)]
17761776
fn eq(&self, other: &*const T) -> bool {
17771777
*self == *other
17781778
}
@@ -1785,7 +1785,7 @@ impl<T: ?Sized> Eq for *const T {}
17851785
#[stable(feature = "rust1", since = "1.0.0")]
17861786
impl<T: ?Sized> Ord for *const T {
17871787
#[inline]
1788-
#[cfg_attr(not(bootstrap), allow(ambiguous_wide_pointer_comparisons))]
1788+
#[allow(ambiguous_wide_pointer_comparisons)]
17891789
fn cmp(&self, other: &*const T) -> Ordering {
17901790
if self < other {
17911791
Less
@@ -1805,25 +1805,25 @@ impl<T: ?Sized> PartialOrd for *const T {
18051805
}
18061806

18071807
#[inline]
1808-
#[cfg_attr(not(bootstrap), allow(ambiguous_wide_pointer_comparisons))]
1808+
#[allow(ambiguous_wide_pointer_comparisons)]
18091809
fn lt(&self, other: &*const T) -> bool {
18101810
*self < *other
18111811
}
18121812

18131813
#[inline]
1814-
#[cfg_attr(not(bootstrap), allow(ambiguous_wide_pointer_comparisons))]
1814+
#[allow(ambiguous_wide_pointer_comparisons)]
18151815
fn le(&self, other: &*const T) -> bool {
18161816
*self <= *other
18171817
}
18181818

18191819
#[inline]
1820-
#[cfg_attr(not(bootstrap), allow(ambiguous_wide_pointer_comparisons))]
1820+
#[allow(ambiguous_wide_pointer_comparisons)]
18211821
fn gt(&self, other: &*const T) -> bool {
18221822
*self > *other
18231823
}
18241824

18251825
#[inline]
1826-
#[cfg_attr(not(bootstrap), allow(ambiguous_wide_pointer_comparisons))]
1826+
#[allow(ambiguous_wide_pointer_comparisons)]
18271827
fn ge(&self, other: &*const T) -> bool {
18281828
*self >= *other
18291829
}

‎library/core/src/ptr/mod.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -720,8 +720,8 @@ where
720720
/// type or mutability, in particular if the code is refactored.
721721
#[inline(always)]
722722
#[must_use]
723-
#[stable(feature = "ptr_from_ref", since = "CURRENT_RUSTC_VERSION")]
724-
#[rustc_const_stable(feature = "ptr_from_ref", since = "CURRENT_RUSTC_VERSION")]
723+
#[stable(feature = "ptr_from_ref", since = "1.76.0")]
724+
#[rustc_const_stable(feature = "ptr_from_ref", since = "1.76.0")]
725725
#[rustc_never_returns_null_ptr]
726726
#[rustc_diagnostic_item = "ptr_from_ref"]
727727
pub const fn from_ref<T: ?Sized>(r: &T) -> *const T {
@@ -734,8 +734,8 @@ pub const fn from_ref<T: ?Sized>(r: &T) -> *const T {
734734
/// type or mutability, in particular if the code is refactored.
735735
#[inline(always)]
736736
#[must_use]
737-
#[stable(feature = "ptr_from_ref", since = "CURRENT_RUSTC_VERSION")]
738-
#[rustc_const_stable(feature = "ptr_from_ref", since = "CURRENT_RUSTC_VERSION")]
737+
#[stable(feature = "ptr_from_ref", since = "1.76.0")]
738+
#[rustc_const_stable(feature = "ptr_from_ref", since = "1.76.0")]
739739
#[rustc_allow_const_fn_unstable(const_mut_refs)]
740740
#[rustc_never_returns_null_ptr]
741741
pub const fn from_mut<T: ?Sized>(r: &mut T) -> *mut T {
@@ -1900,7 +1900,7 @@ pub(crate) const unsafe fn align_offset<T: Sized>(p: *const T, a: usize) -> usiz
19001900
#[inline(always)]
19011901
#[must_use = "pointer comparison produces a value"]
19021902
#[rustc_diagnostic_item = "ptr_eq"]
1903-
#[cfg_attr(not(bootstrap), allow(ambiguous_wide_pointer_comparisons))] // it's actually clear here
1903+
#[allow(ambiguous_wide_pointer_comparisons)] // it's actually clear here
19041904
pub fn eq<T: ?Sized>(a: *const T, b: *const T) -> bool {
19051905
a == b
19061906
}
@@ -1922,7 +1922,7 @@ pub fn eq<T: ?Sized>(a: *const T, b: *const T) -> bool {
19221922
/// assert!(ptr::addr_eq(whole, first));
19231923
/// assert!(!ptr::eq::<dyn std::fmt::Debug>(whole, first));
19241924
/// ```
1925-
#[stable(feature = "ptr_addr_eq", since = "CURRENT_RUSTC_VERSION")]
1925+
#[stable(feature = "ptr_addr_eq", since = "1.76.0")]
19261926
#[inline(always)]
19271927
#[must_use = "pointer comparison produces a value"]
19281928
pub fn addr_eq<T: ?Sized, U: ?Sized>(p: *const T, q: *const U) -> bool {

‎library/core/src/ptr/mut_ptr.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2199,7 +2199,7 @@ impl<T> *mut [T] {
21992199
#[stable(feature = "rust1", since = "1.0.0")]
22002200
impl<T: ?Sized> PartialEq for *mut T {
22012201
#[inline(always)]
2202-
#[cfg_attr(not(bootstrap), allow(ambiguous_wide_pointer_comparisons))]
2202+
#[allow(ambiguous_wide_pointer_comparisons)]
22032203
fn eq(&self, other: &*mut T) -> bool {
22042204
*self == *other
22052205
}
@@ -2211,7 +2211,7 @@ impl<T: ?Sized> Eq for *mut T {}
22112211
#[stable(feature = "rust1", since = "1.0.0")]
22122212
impl<T: ?Sized> Ord for *mut T {
22132213
#[inline]
2214-
#[cfg_attr(not(bootstrap), allow(ambiguous_wide_pointer_comparisons))]
2214+
#[allow(ambiguous_wide_pointer_comparisons)]
22152215
fn cmp(&self, other: &*mut T) -> Ordering {
22162216
if self < other {
22172217
Less
@@ -2231,25 +2231,25 @@ impl<T: ?Sized> PartialOrd for *mut T {
22312231
}
22322232

22332233
#[inline(always)]
2234-
#[cfg_attr(not(bootstrap), allow(ambiguous_wide_pointer_comparisons))]
2234+
#[allow(ambiguous_wide_pointer_comparisons)]
22352235
fn lt(&self, other: &*mut T) -> bool {
22362236
*self < *other
22372237
}
22382238

22392239
#[inline(always)]
2240-
#[cfg_attr(not(bootstrap), allow(ambiguous_wide_pointer_comparisons))]
2240+
#[allow(ambiguous_wide_pointer_comparisons)]
22412241
fn le(&self, other: &*mut T) -> bool {
22422242
*self <= *other
22432243
}
22442244

22452245
#[inline(always)]
2246-
#[cfg_attr(not(bootstrap), allow(ambiguous_wide_pointer_comparisons))]
2246+
#[allow(ambiguous_wide_pointer_comparisons)]
22472247
fn gt(&self, other: &*mut T) -> bool {
22482248
*self > *other
22492249
}
22502250

22512251
#[inline(always)]
2252-
#[cfg_attr(not(bootstrap), allow(ambiguous_wide_pointer_comparisons))]
2252+
#[allow(ambiguous_wide_pointer_comparisons)]
22532253
fn ge(&self, other: &*mut T) -> bool {
22542254
*self >= *other
22552255
}

‎library/core/src/ptr/non_null.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1791,7 +1791,7 @@ impl<T: ?Sized> Eq for NonNull<T> {}
17911791
#[stable(feature = "nonnull", since = "1.25.0")]
17921792
impl<T: ?Sized> PartialEq for NonNull<T> {
17931793
#[inline]
1794-
#[cfg_attr(not(bootstrap), allow(ambiguous_wide_pointer_comparisons))]
1794+
#[allow(ambiguous_wide_pointer_comparisons)]
17951795
fn eq(&self, other: &Self) -> bool {
17961796
self.as_ptr() == other.as_ptr()
17971797
}

‎library/core/src/result.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -842,7 +842,7 @@ impl<T, E> Result<T, E> {
842842
/// .expect("failed to parse number");
843843
/// ```
844844
#[inline]
845-
#[stable(feature = "result_option_inspect", since = "CURRENT_RUSTC_VERSION")]
845+
#[stable(feature = "result_option_inspect", since = "1.76.0")]
846846
pub fn inspect<F: FnOnce(&T)>(self, f: F) -> Self {
847847
if let Ok(ref t) = self {
848848
f(t);
@@ -864,7 +864,7 @@ impl<T, E> Result<T, E> {
864864
/// }
865865
/// ```
866866
#[inline]
867-
#[stable(feature = "result_option_inspect", since = "CURRENT_RUSTC_VERSION")]
867+
#[stable(feature = "result_option_inspect", since = "1.76.0")]
868868
pub fn inspect_err<F: FnOnce(&E)>(self, f: F) -> Self {
869869
if let Err(ref e) = self {
870870
f(e);

‎library/core/src/tuple.rs

Lines changed: 0 additions & 140 deletions
Original file line numberDiff line numberDiff line change
@@ -8,146 +8,6 @@ use crate::marker::{StructuralEq, StructuralPartialEq};
88
//
99
// Also provides implementations for tuples with lesser arity. For example, tuple_impls!(A B C)
1010
// will implement everything for (A, B, C), (A, B) and (A,).
11-
#[cfg(bootstrap)]
12-
macro_rules! tuple_impls {
13-
// Stopping criteria (1-ary tuple)
14-
($T:ident) => {
15-
tuple_impls!(@impl $T);
16-
};
17-
// Running criteria (n-ary tuple, with n >= 2)
18-
($T:ident $( $U:ident )+) => {
19-
tuple_impls!($( $U )+);
20-
tuple_impls!(@impl $T $( $U )+);
21-
};
22-
// "Private" internal implementation
23-
(@impl $( $T:ident )+) => {
24-
maybe_tuple_doc! {
25-
$($T)+ @
26-
#[stable(feature = "rust1", since = "1.0.0")]
27-
impl<$($T: PartialEq),+> PartialEq for ($($T,)+)
28-
where
29-
last_type!($($T,)+): ?Sized
30-
{
31-
#[inline]
32-
fn eq(&self, other: &($($T,)+)) -> bool {
33-
$( ${ignore(T)} self.${index()} == other.${index()} )&&+
34-
}
35-
#[inline]
36-
fn ne(&self, other: &($($T,)+)) -> bool {
37-
$( ${ignore(T)} self.${index()} != other.${index()} )||+
38-
}
39-
}
40-
}
41-
42-
maybe_tuple_doc! {
43-
$($T)+ @
44-
#[stable(feature = "rust1", since = "1.0.0")]
45-
impl<$($T: Eq),+> Eq for ($($T,)+)
46-
where
47-
last_type!($($T,)+): ?Sized
48-
{}
49-
}
50-
51-
maybe_tuple_doc! {
52-
$($T)+ @
53-
#[unstable(feature = "structural_match", issue = "31434")]
54-
impl<$($T: ConstParamTy),+> ConstParamTy for ($($T,)+) {}
55-
}
56-
57-
maybe_tuple_doc! {
58-
$($T)+ @
59-
#[unstable(feature = "structural_match", issue = "31434")]
60-
impl<$($T),+> StructuralPartialEq for ($($T,)+) {}
61-
}
62-
63-
maybe_tuple_doc! {
64-
$($T)+ @
65-
#[unstable(feature = "structural_match", issue = "31434")]
66-
impl<$($T),+> StructuralEq for ($($T,)+) {}
67-
}
68-
69-
maybe_tuple_doc! {
70-
$($T)+ @
71-
#[stable(feature = "rust1", since = "1.0.0")]
72-
impl<$($T: PartialOrd),+> PartialOrd for ($($T,)+)
73-
where
74-
last_type!($($T,)+): ?Sized
75-
{
76-
#[inline]
77-
fn partial_cmp(&self, other: &($($T,)+)) -> Option<Ordering> {
78-
lexical_partial_cmp!($( ${ignore(T)} self.${index()}, other.${index()} ),+)
79-
}
80-
#[inline]
81-
fn lt(&self, other: &($($T,)+)) -> bool {
82-
lexical_ord!(lt, Less, $( ${ignore(T)} self.${index()}, other.${index()} ),+)
83-
}
84-
#[inline]
85-
fn le(&self, other: &($($T,)+)) -> bool {
86-
lexical_ord!(le, Less, $( ${ignore(T)} self.${index()}, other.${index()} ),+)
87-
}
88-
#[inline]
89-
fn ge(&self, other: &($($T,)+)) -> bool {
90-
lexical_ord!(ge, Greater, $( ${ignore(T)} self.${index()}, other.${index()} ),+)
91-
}
92-
#[inline]
93-
fn gt(&self, other: &($($T,)+)) -> bool {
94-
lexical_ord!(gt, Greater, $( ${ignore(T)} self.${index()}, other.${index()} ),+)
95-
}
96-
}
97-
}
98-
99-
maybe_tuple_doc! {
100-
$($T)+ @
101-
#[stable(feature = "rust1", since = "1.0.0")]
102-
impl<$($T: Ord),+> Ord for ($($T,)+)
103-
where
104-
last_type!($($T,)+): ?Sized
105-
{
106-
#[inline]
107-
fn cmp(&self, other: &($($T,)+)) -> Ordering {
108-
lexical_cmp!($( ${ignore(T)} self.${index()}, other.${index()} ),+)
109-
}
110-
}
111-
}
112-
113-
maybe_tuple_doc! {
114-
$($T)+ @
115-
#[stable(feature = "rust1", since = "1.0.0")]
116-
impl<$($T: Default),+> Default for ($($T,)+) {
117-
#[inline]
118-
fn default() -> ($($T,)+) {
119-
($($T::default(),)+)
120-
}
121-
}
122-
}
123-
124-
#[stable(feature = "array_tuple_conv", since = "1.71.0")]
125-
impl<T> From<[T; ${count(T)}]> for ($(${ignore(T)} T,)+) {
126-
#[inline]
127-
#[allow(non_snake_case)]
128-
fn from(array: [T; ${count(T)}]) -> Self {
129-
let [$($T,)+] = array;
130-
($($T,)+)
131-
}
132-
}
133-
134-
#[stable(feature = "array_tuple_conv", since = "1.71.0")]
135-
impl<T> From<($(${ignore(T)} T,)+)> for [T; ${count(T)}] {
136-
#[inline]
137-
#[allow(non_snake_case)]
138-
fn from(tuple: ($(${ignore(T)} T,)+)) -> Self {
139-
let ($($T,)+) = tuple;
140-
[$($T,)+]
141-
}
142-
}
143-
}
144-
}
145-
146-
// Recursive macro for implementing n-ary tuple functions and operations
147-
//
148-
// Also provides implementations for tuples with lesser arity. For example, tuple_impls!(A B C)
149-
// will implement everything for (A, B, C), (A, B) and (A,).
150-
#[cfg(not(bootstrap))]
15111
macro_rules! tuple_impls {
15212
// Stopping criteria (1-ary tuple)
15313
($T:ident) => {

‎library/core/tests/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@
111111
#![feature(slice_flatten)]
112112
#![feature(error_generic_member_access)]
113113
#![feature(error_in_core)]
114-
#![cfg_attr(bootstrap, feature(trait_upcasting))]
115114
#![feature(utf8_chunks)]
116115
#![feature(is_ascii_octdigit)]
117116
#![feature(get_many_mut)]

‎library/std/src/hash/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,5 +87,5 @@ pub(crate) mod random;
8787
#[stable(feature = "rust1", since = "1.0.0")]
8888
pub use core::hash::*;
8989

90-
#[stable(feature = "std_hash_exports", since = "CURRENT_RUSTC_VERSION")]
90+
#[stable(feature = "std_hash_exports", since = "1.76.0")]
9191
pub use self::random::{DefaultHasher, RandomState};

‎library/std/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,6 @@
308308
//
309309
// Library features (core):
310310
// tidy-alphabetical-start
311-
#![cfg_attr(bootstrap, feature(c_str_literals))]
312311
#![feature(char_internals)]
313312
#![feature(core_intrinsics)]
314313
#![feature(core_io_borrowed_buf)]

‎src/stage0.json

Lines changed: 412 additions & 414 deletions
Large diffs are not rendered by default.

‎src/tools/miri/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
#![feature(round_ties_even)]
1212
#![feature(let_chains)]
1313
#![feature(lint_reasons)]
14-
#![cfg_attr(bootstrap, feature(trait_upcasting))]
1514
// Configure clippy and other lints
1615
#![allow(
1716
clippy::collapsible_else_if,

0 commit comments

Comments
 (0)
Please sign in to comment.