rust/src
Jieyou Xu 2e832047c6 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.

(cherry picked from commit 69b71e4410)
2025-07-24 11:02:01 -07:00
..
bootstrap Disable docs for compiler-builtins and sysroot 2025-07-10 13:30:37 -07:00
build_helper Improve error message for rustdoc_json_types tidy check 2025-06-20 16:22:05 +02:00
ci Update channel to beta 2025-06-23 14:13:20 -07:00
doc [beta] Update src/doc/reference 2025-06-24 17:05:57 -07:00
etc Remove unused bootstrap flag 2025-06-18 09:38:28 +02:00
gcc@04ce66d8c9 Update src/gcc submodule to 04ce66d8c918de9273bd7101638ad8724edf5e21 2025-05-14 18:02:02 +02:00
librustdoc Fix rustdoc not correctly showing attributes with re-exports 2025-07-17 14:02:06 -07:00
llvm-project@9b1bf4cf04 Update LLVM submodule 2025-07-10 13:30:37 -07:00
rustc-std-workspace
rustdoc-json-types Port #[no_mangle] to new attribute parsing infrastructure 2025-06-22 22:17:04 +02:00
tools Mitigate #[align] name resolution ambiguity regression with a rename 2025-07-24 11:02:01 -07:00
README.md
stage0 stage0 bump to 1.88.0 2025-06-26 11:33:11 -07:00
version bump version number to 1.89.0 2025-05-09 11:13:08 +02:00

This directory contains some source code for the Rust project, including:

  • The bootstrapping build system
  • Various submodules for tools, like cargo, tidy, etc.

For more information on how various parts of the compiler work, see the rustc dev guide.