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
3 changes: 0 additions & 3 deletions compiler/rustc_data_structures/src/aligned.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
use std::marker::PointeeSized;
#[cfg(not(bootstrap))]
use std::mem::Alignment;
#[cfg(bootstrap)]
use std::ptr::Alignment;

/// Returns the ABI-required minimum alignment of a type in bytes.
///
Expand Down
3 changes: 0 additions & 3 deletions compiler/rustc_data_structures/src/tagged_ptr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,6 @@ pub unsafe trait Tag: Copy {
/// (this is based on `T`'s alignment).
pub const fn bits_for<T: ?Sized + Aligned>() -> u32 {
let alignment = crate::aligned::align_of::<T>();
#[cfg(bootstrap)]
let alignment = alignment.as_nonzero();
#[cfg(not(bootstrap))]
let alignment = alignment.as_nonzero_usize();
alignment.trailing_zeros()
}
Expand Down
16 changes: 8 additions & 8 deletions compiler/rustc_feature/src/unstable.rs
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: I think there's a line in src/bootstrap/src/core/build_steps/doc.rs:937 that we might want to remove the staging gate for

        // FIXME: Currently, `--generate-macro-expansion` option is buggy in `beta` rustdoc. To
        // allow CI to pass, we only enable the option in stage 2 and higher.
        // cfg(bootstrap)
        // ^ Adding this so it's not forgotten when the new release is done.
        if builder.top_stage > 1 {
            cargo.rustdocflag("--generate-macro-expansion");
        }

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: There's also compiler/rustc_index/src/lib.rs:10

// FIXME(#125687): new_range_api recently stabilized
// Remove this when it hits stable. cfg(bootstrap)
#![allow(stable_features)]
#![cfg_attr(feature = "nightly", feature(new_range_api))]

Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ declare_features! (
/// Implementation details of externally implementable items
(internal, eii_internals, "1.94.0", None),
/// Implementation details of field representing types.
(internal, field_representing_type_raw, "CURRENT_RUSTC_VERSION", None),
(internal, field_representing_type_raw, "1.96.0", None),
/// Outputs useful `assert!` messages
(unstable, generic_assert, "1.63.0", None),
/// Allows using the #[rustc_intrinsic] attribute.
Expand All @@ -258,7 +258,7 @@ declare_features! (
/// Allows using the `#[stable]` and `#[unstable]` attributes.
(internal, staged_api, "1.0.0", None),
/// Perma-unstable, only used to test the `incomplete_features` lint.
(incomplete, test_incomplete_feature, "CURRENT_RUSTC_VERSION", None),
(incomplete, test_incomplete_feature, "1.96.0", None),
/// Added for testing unstable lints; perma-unstable.
(internal, test_unstable_lint, "1.60.0", None),
/// Use for stable + negative coherence and strict coherence depending on trait's
Expand Down Expand Up @@ -475,9 +475,9 @@ declare_features! (
/// Allows giving non-const impls custom diagnostic messages if attempted to be used as const
(unstable, diagnostic_on_const, "1.93.0", Some(143874)),
/// Allows giving on-move borrowck custom diagnostic messages for a type
(unstable, diagnostic_on_move, "CURRENT_RUSTC_VERSION", Some(154181)),
(unstable, diagnostic_on_move, "1.96.0", Some(154181)),
/// Allows giving unresolved imports a custom diagnostic message
(unstable, diagnostic_on_unknown, "CURRENT_RUSTC_VERSION", Some(152900)),
(unstable, diagnostic_on_unknown, "1.96.0", Some(152900)),
/// Allows `#[doc(cfg(...))]`.
(unstable, doc_cfg, "1.21.0", Some(43781)),
/// Allows `#[doc(masked)]`.
Expand Down Expand Up @@ -509,7 +509,7 @@ declare_features! (
/// Allows the use of `#[ffi_pure]` on foreign functions.
(unstable, ffi_pure, "1.45.0", Some(58329)),
/// Experimental field projections.
(incomplete, field_projections, "CURRENT_RUSTC_VERSION", Some(145383)),
(incomplete, field_projections, "1.96.0", Some(145383)),
/// Allows marking trait functions as `final` to prevent overriding impls
(unstable, final_associated_functions, "1.95.0", Some(131179)),
/// Controlling the behavior of fmt::Debug
Expand Down Expand Up @@ -543,7 +543,7 @@ declare_features! (
/// Target features on hexagon.
(unstable, hexagon_target_feature, "1.27.0", Some(150250)),
/// Allows `impl(crate) trait Foo` restrictions.
(incomplete, impl_restriction, "CURRENT_RUSTC_VERSION", Some(105077)),
(incomplete, impl_restriction, "1.96.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 @@ -576,7 +576,7 @@ declare_features! (
/// Allow `macro_rules!` derive rules
(unstable, macro_derive, "1.91.0", Some(143549)),
/// Allow `$x:guard` matcher in macros
(unstable, macro_guard_matcher, "CURRENT_RUSTC_VERSION", Some(153104)),
(unstable, macro_guard_matcher, "1.96.0", Some(153104)),
/// Give access to additional metadata about declarative macro meta-variables.
(unstable, macro_metavar_expr, "1.61.0", Some(83527)),
/// Provides a way to concatenate identifiers using metavariable expressions.
Expand All @@ -587,7 +587,7 @@ declare_features! (
(incomplete, mgca_type_const_syntax, "1.95.0", Some(132980)),
/// Allows additional const parameter types, such as [u8; 10] or user defined types.
/// User defined types must not have fields more private than the type itself.
(unstable, min_adt_const_params, "CURRENT_RUSTC_VERSION", Some(154042)),
(unstable, min_adt_const_params, "1.96.0", Some(154042)),
/// Enables the generic const args MVP (only bare paths, not arbitrary computation).
(incomplete, min_generic_const_args, "1.84.0", Some(132980)),
/// A minimal, sound subset of specialization intended to be used by the
Expand Down
3 changes: 1 addition & 2 deletions compiler/rustc_lint_defs/src/builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2719,8 +2719,7 @@ declare_lint! {
///
/// ### Example
///
#[cfg_attr(bootstrap, doc = "```rust")]
#[cfg_attr(not(bootstrap), doc = "```rust,compile_fail")]
#[doc = "```rust,compile_fail"]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: this can now just be

/// ```rust,compile_fail

(not the end of the world tho)

/// enum Void {}
/// unsafe extern {
/// static EXTERN: Void;
Expand Down
3 changes: 0 additions & 3 deletions compiler/rustc_middle/src/ty/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -275,9 +275,6 @@ unsafe impl<H: DynSync, T: DynSync> DynSync for RawList<H, T> {}
// `_extern_ty` field (which is never instantiated in practice). Therefore,
// aligns of `ListSkeleton<H, T>` and `RawList<H, T>` must be the same.
unsafe impl<H, T> Aligned for RawList<H, T> {
#[cfg(bootstrap)]
const ALIGN: ptr::Alignment = align_of::<ListSkeleton<H, T>>();
#[cfg(not(bootstrap))]
const ALIGN: mem::Alignment = align_of::<ListSkeleton<H, T>>();
}

Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_type_ir/src/infer_ctxt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ use crate::{self as ty, Interner, TyVid};
feature = "nightly",
derive(Encodable_NoContext, Decodable_NoContext, HashStable_NoContext)
)]
#[cfg_attr(feature = "nightly", cfg_attr(not(bootstrap), rustc_must_match_exhaustively))]
#[cfg_attr(feature = "nightly", rustc_must_match_exhaustively)]
pub enum TypingMode<I: Interner> {
/// When checking whether impls overlap, we check whether any obligations
/// are guaranteed to never hold when unifying the impls. This requires us
Expand Down
2 changes: 1 addition & 1 deletion library/core/src/cell/lazy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ impl<T: fmt::Debug, F> fmt::Debug for LazyCell<T, F> {
}
}

#[stable(feature = "from_wrapper_impls", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "from_wrapper_impls", since = "1.96.0")]
impl<T, F> From<T> for LazyCell<T, F> {
/// Constructs a `LazyCell` that starts already initialized
/// with the provided value.
Expand Down
2 changes: 1 addition & 1 deletion library/core/src/ffi/c_str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,7 @@ impl ops::Index<ops::RangeFrom<usize>> for CStr {
}
}

#[stable(feature = "new_range_from_api", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "new_range_from_api", since = "1.96.0")]
impl ops::Index<range::RangeFrom<usize>> for CStr {
type Output = CStr;

Expand Down
2 changes: 1 addition & 1 deletion library/core/src/mem/alignment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ impl Alignment {
/// Returns the alignment as a <code>[NonZero]<[usize]></code>.
#[unstable(feature = "ptr_alignment_type", issue = "102070")]
#[deprecated(
since = "CURRENT_RUSTC_VERSION",
since = "1.96.0",
note = "renamed to `as_nonzero_usize`",
suggestion = "as_nonzero_usize"
)]
Expand Down
8 changes: 4 additions & 4 deletions library/core/src/ops/control_flow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,8 @@ impl<B, C> ControlFlow<B, C> {
/// assert_eq!(res, Ok(&5));
/// ```
#[inline]
#[stable(feature = "control_flow_ok", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "control_flow_ok", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "control_flow_ok", since = "1.96.0")]
#[rustc_const_stable(feature = "control_flow_ok", since = "1.96.0")]
#[rustc_allow_const_fn_unstable(const_precise_live_drops)]
pub const fn break_ok(self) -> Result<B, C> {
match self {
Expand Down Expand Up @@ -374,8 +374,8 @@ impl<B, C> ControlFlow<B, C> {
/// assert_eq!(res, Err("too big value detected"));
/// ```
#[inline]
#[stable(feature = "control_flow_ok", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "control_flow_ok", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "control_flow_ok", since = "1.96.0")]
#[rustc_const_stable(feature = "control_flow_ok", since = "1.96.0")]
#[rustc_allow_const_fn_unstable(const_precise_live_drops)]
pub const fn continue_ok(self) -> Result<C, B> {
match self {
Expand Down
2 changes: 1 addition & 1 deletion library/core/src/panic/unwind_safe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ impl<S: AsyncIterator> AsyncIterator for AssertUnwindSafe<S> {

/// If a value's type is already `UnwindSafe`,
/// wrapping it in `AssertUnwindSafe` is never incorrect.
#[stable(feature = "from_wrapper_impls", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "from_wrapper_impls", since = "1.96.0")]
impl<T> From<T> for AssertUnwindSafe<T>
where
T: UnwindSafe,
Expand Down
2 changes: 1 addition & 1 deletion library/core/src/ptr/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ use crate::num::NonZero;
use crate::{fmt, hash, intrinsics, ub_checks};

#[unstable(feature = "ptr_alignment_type", issue = "102070")]
#[deprecated(since = "CURRENT_RUSTC_VERSION", note = "moved from `ptr` to `mem`")]
#[deprecated(since = "1.96.0", note = "moved from `ptr` to `mem`")]
/// Deprecated re-export of [mem::Alignment].
pub type Alignment = mem::Alignment;

Expand Down
Loading
Loading