<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/compiler/rustc_attr_data_structures/src, branch master</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=master</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=master'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2025-07-31T12:19:27+00:00</updated>
<entry>
<title>remove rustc_attr_data_structures</title>
<updated>2025-07-31T12:19:27+00:00</updated>
<author>
<name>Jana Dönszelmann</name>
<email>jana@donsz.nl</email>
</author>
<published>2025-07-31T09:00:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=e1d3ad89c7a2ad4f5d944a7fee1298ffe8c99645'/>
<id>urn:sha1:e1d3ad89c7a2ad4f5d944a7fee1298ffe8c99645</id>
<content type='text'>
</content>
</entry>
<entry>
<title>coverage: Rename `CoverageStatus` to `CoverageAttrKind`</title>
<updated>2025-07-29T09:55:54+00:00</updated>
<author>
<name>Zalathar</name>
<email>Zalathar@users.noreply.github.com</email>
</author>
<published>2025-07-28T02:29:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=b4d0c91635e87be830282cb86d23882b6b6f9dad'/>
<id>urn:sha1:b4d0c91635e87be830282cb86d23882b6b6f9dad</id>
<content type='text'>
This patch also prepares the affected code in `coverage_attr_on` for some
subsequent changes.
</content>
</entry>
<entry>
<title>Add attributes to AttributeKind</title>
<updated>2025-07-26T18:25:39+00:00</updated>
<author>
<name>Jonathan Brouwer</name>
<email>jonathantbrouwer@gmail.com</email>
</author>
<published>2025-07-07T12:29:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=39235beeb41a8334a2a3d8e70c4baa10e681ed2b'/>
<id>urn:sha1:39235beeb41a8334a2a3d8e70c4baa10e681ed2b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Ports `#[macro_use]` and `#[macro_escape]` to the new attribute parsing infrastructure</title>
<updated>2025-07-23T11:33:23+00:00</updated>
<author>
<name>Jonathan Brouwer</name>
<email>jonathantbrouwer@gmail.com</email>
</author>
<published>2025-07-12T15:42:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=a460b46d0f7d95a0a07bad444606f6fd53aea62c'/>
<id>urn:sha1:a460b46d0f7d95a0a07bad444606f6fd53aea62c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Rollup merge of #144080 - jieyouxu:realign, r=BoxyUwU</title>
<updated>2025-07-21T16:54:28+00:00</updated>
<author>
<name>许杰友 Jieyou Xu (Joe)</name>
<email>39484203+jieyouxu@users.noreply.github.com</email>
</author>
<published>2025-07-21T16:54:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=ef4a7fb1b7f398565a038c1eb84da30e53006599'/>
<id>urn:sha1:ef4a7fb1b7f398565a038c1eb84da30e53006599</id>
<content type='text'>
Mitigate `#[align]` name resolution ambiguity regression with a rename

Mitigates beta regression rust-lang/rust#143834 after a beta backport.

### Background on the beta regression

The name resolution regression arises due to rust-lang/rust#142507 adding a new feature-gated built-in attribute named `#[align]`. However, unfortunately even [introducing new feature-gated unstable built-in attributes can break user code](https://www.github.com/rust-lang/rust/issues/134963) such as

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

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

### Mitigation approach

This PR renames `#[align]` to `#[rustc_align]` to mitigate the beta regression by:

1. Undoing the introduction of a new built-in attribute with a common name, i.e. `#[align]`.
2. Renaming `#[align]` to `#[rustc_align]`. The renamed attribute being `rustc_align` will not introduce new stable breakages, as attributes beginning with `rustc` are reserved and perma-unstable. This does mean existing nightly code using `fn_align` feature will additionally need to specify `#![feature(rustc_attrs)]`.

This PR is very much a short-term mitigation to alleviate time pressure from having to fully fix the current limitation of inevitable name resolution regressions that would arise from adding any built-in attributes. Long-term solutions are discussed in [#t-lang &gt; namespacing macro attrs to reduce conflicts with new adds](https://rust-lang.zulipchat.com/#narrow/channel/213817-t-lang/topic/namespacing.20macro.20attrs.20to.20reduce.20conflicts.20with.20new.20adds/with/529249622).

### Alternative mitigation options

[Various mitigation options were considered during the compiler triage meeting](https://github.com/rust-lang/rust/issues/143834#issuecomment-3084415277), and those consideration are partly reproduced here:

- Reverting the PR doesn't seem very minimal/trivial, and carries risks of its own.
- Rename to a less-common but aim-to-stabilization name is itself not safe nor convenient, because (1) that risks introducing new regressions (i.e. ambiguity against the new name), and (2) lang would have to FCP the new name hastily for the mitigation to land timely and have a chance to be backported. This also makes the path towards stabilization annoying.
- Rename the attribute to a rustc attribute, which will be perma-unstable and does not cause new ambiguities in stable code.
    - This alleviates the time pressure to address *this* regression, or for lang to have to rush an FCP for some new name that can still break user code.
    - This avoids backing out a whole implementation.

### Review advice

This PR is best reviewed commit-by-commit.

- Commit 1 adds a test `tests/ui/attributes/fn-align-nameres-ambiguity-143834.rs` which demonstrates the current name resolution regression re. `align`. This test fails against current master.
- Commit 2 carries out the renames and test reblesses. Notably, commit 2 will cause `tests/ui/attributes/fn-align-nameres-ambiguity-143834.rs` to change from fail (nameres regression) to pass.

This PR, if the approach still seems acceptable, will need a beta-backport to address the beta regression.
</content>
</entry>
<entry>
<title>Auto merge of #144145 - matthiaskrgr:rollup-swc74s4, r=matthiaskrgr</title>
<updated>2025-07-19T05:02:40+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2025-07-19T05:02:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=1079c5edb2bd837e5c4cf8c7db2892db359a3862'/>
<id>urn:sha1:1079c5edb2bd837e5c4cf8c7db2892db359a3862</id>
<content type='text'>
Rollup of 9 pull requests

Successful merges:

 - rust-lang/rust#138554 (Distinguish delim kind to decide whether to emit unexpected closing delimiter)
 - rust-lang/rust#142673 (Show the offset, length and memory of uninit read errors)
 - rust-lang/rust#142693 (More robustly deal with relaxed bounds and improve their diagnostics)
 - rust-lang/rust#143382 (stabilize `const_slice_reverse`)
 - rust-lang/rust#143928 (opt-dist: make llvm builds optional)
 - rust-lang/rust#143961 (Correct which exploit mitigations are enabled by default)
 - rust-lang/rust#144050 (Fix encoding of link_section and no_mangle cross crate)
 - rust-lang/rust#144059 (Refactor `CrateLoader` into the `CStore`)
 - rust-lang/rust#144123 (Generalize `unsize` and `unsize_into` destinations)

r? `@ghost`
`@rustbot` modify labels: rollup
</content>
</entry>
<entry>
<title>Mitigate `#[align]` name resolution ambiguity regression with a rename</title>
<updated>2025-07-18T17:42:30+00:00</updated>
<author>
<name>Jieyou Xu</name>
<email>jieyouxu@outlook.com</email>
</author>
<published>2025-07-17T16:10:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=69b71e44107b4905ec7ad84ccb3edf4f14b3df69'/>
<id>urn:sha1:69b71e44107b4905ec7ad84ccb3edf4f14b3df69</id>
<content type='text'>
From `#[align]` -&gt; `#[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 {
    () =&gt; {
        /* .. */
    };
}

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
&lt;https://rust-lang.zulipchat.com/#narrow/channel/238009-t-compiler.2Fmeetings/topic/.5Bweekly.5D.202025-07-17/near/529290371&gt;
where mitigation options were considered.
</content>
</entry>
<entry>
<title>Rollup merge of #144050 - JonathanBrouwer:cross-crate-reexport, r=jdonszelmann</title>
<updated>2025-07-18T17:14:46+00:00</updated>
<author>
<name>Matthias Krüger</name>
<email>476013+matthiaskrgr@users.noreply.github.com</email>
</author>
<published>2025-07-18T17:14:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=1b437d78e346fb243e8e7702d8f315e8ce4d9948'/>
<id>urn:sha1:1b437d78e346fb243e8e7702d8f315e8ce4d9948</id>
<content type='text'>
Fix encoding of link_section and no_mangle cross crate

Fixes https://github.com/rust-lang/rust/issues/144004

``@bjorn3`` suggested using the `codegen_fn_attrs` query but given that these attributes are not that common it's probably fine to just always encode them. I can also go for that solution if it is preferred but that would require more changes.

r? ``@jdonszelmann`` ``@fmease`` (whoever feels like it)
</content>
</entry>
<entry>
<title>Auto merge of #143845 - cjgillot:stability-query, r=jieyouxu</title>
<updated>2025-07-18T16:27:59+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2025-07-18T16:27:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=8f08b3a32478b8d0507732800ecb548a76e0fd0c'/>
<id>urn:sha1:8f08b3a32478b8d0507732800ecb548a76e0fd0c</id>
<content type='text'>
Split-up stability_index query

This PR aims to move deprecation and stability processing away from the monolithic `stability_index` query, and directly implement `lookup_{deprecation,stability,body_stability,const_stability}` queries.

The basic idea is to:
- move per-attribute sanity checks into `check_attr.rs`;
- move attribute compatibility checks into the `MissingStabilityAnnotations` visitor;
- progressively dismantle the `Annotator` visitor and the `stability_index` query.

The first commit contains functional change, and now warns when `#[automatically_derived]` is applied on a non-trait impl block. The other commits should not change visible behaviour.

Perf in https://github.com/rust-lang/rust/pull/143845#issuecomment-3066308630 shows small but consistent improvement, except for unused-warnings case. That case being a stress test, I'm leaning towards accepting the regression.

This PR changes `check_attr`, so has a high conflict rate on that file. This should not cause issues for review.
</content>
</entry>
<entry>
<title>Rollup merge of #143891 - scrabsha:push-xxtttopqoprr, r=jdonszelmann</title>
<updated>2025-07-18T02:27:52+00:00</updated>
<author>
<name>Matthias Krüger</name>
<email>476013+matthiaskrgr@users.noreply.github.com</email>
</author>
<published>2025-07-18T02:27:52+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=03734ae794443b435dd58e177b57d053fb06fad0'/>
<id>urn:sha1:03734ae794443b435dd58e177b57d053fb06fad0</id>
<content type='text'>
Port `#[coverage]` to the new attribute system

r? ``````@jdonszelmann``````
</content>
</entry>
</feed>
