rust/compiler/rustc_feature/src
Jieyou Xu 69b71e4410
Mitigate #[align] name resolution ambiguity regression with a rename
From `#[align]` -> `#[rustc_align]`. Attributes starting with `rustc`
are always perma-unstable and feature-gated by `feature(rustc_attrs)`.

See regression RUST-143834.

For the underlying problem where even introducing new feature-gated
unstable built-in attributes can break user code such as

```rs
macro_rules! align {
    () => {
        /* .. */
    };
}

pub(crate) use align; // `use` here becomes ambiguous
```

refer to RUST-134963.

Since the `#[align]` attribute is still feature-gated by
`feature(fn_align)`, we can rename it as a mitigation. Note that
`#[rustc_align]` will obviously mean that current unstable user code
using `feature(fn_aling)` will need additionally `feature(rustc_attrs)`,
but this is a short-term mitigation to buy time, and is expected to be
changed to a better name with less collision potential.

See
<https://rust-lang.zulipchat.com/#narrow/channel/238009-t-compiler.2Fmeetings/topic/.5Bweekly.5D.202025-07-17/near/529290371>
where mitigation options were considered.
2025-07-19 01:42:30 +08:00
..
accepted.rs Auto merge of #143214 - camsteffen:remove-let-chains-feature, r=est31 2025-07-02 17:18:47 +00:00
builtin_attrs.rs Mitigate #[align] name resolution ambiguity regression with a rename 2025-07-19 01:42:30 +08:00
lib.rs Remove rustc_feature::Stability 2025-06-09 11:44:52 +02:00
removed.rs Auto merge of #142974 - cuviper:stage0-bump, r=Mark-Simulacrum 2025-07-02 01:41:18 +00:00
tests.rs rustc_feature: Avoid unsafe std::env::set_var() in UnstableFeatures tests 2025-01-08 11:37:19 +01:00
unstable.rs update issue number for const_trait_impl 2025-07-13 23:55:06 +08:00