Skip to content

[beta] backports #144414

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jul 25, 2025
Merged

[beta] backports #144414

merged 6 commits into from
Jul 25, 2025

Conversation

cuviper
Copy link
Member

@cuviper cuviper commented Jul 24, 2025

r? cuviper

shepmaster and others added 5 commits July 24, 2025 09:53
Key changes include:

- Removal of the word "syntax" from the lint message. More accurately,
  it could have been something like "syntax group" or "syntax
  category", but avoiding it completely is easier.
- The primary lint message now reflects exactly which mismatch is
  occurring, instead of trying to be general. A new `help` line is
  general across the mismatch kinds.
- Suggestions have been reduced to be more minimal, no longer also
  changing non-idiomatic but unrelated aspects.
- Suggestion text no longer mentions changes when those changes don't
  occur in that specific suggestion.

(cherry picked from commit 5530744)
The current behaviour introduced by commit
a50a3b8 would discard any
target features specified after crt-static (the only member of
RUSTC_SPECIFIC_FEATURES). This is because it returned instead of
continuing processing the next flag.

Signed-off-by: Jens Reidel <[email protected]>
(cherry picked from commit 664d742)
…sion

See RUST-143834.

(cherry picked from commit b2e94bf)
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 69b71e4)
@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jul 24, 2025
@rust-log-analyzer

This comment was marked as resolved.

@cuviper
Copy link
Member Author

cuviper commented Jul 24, 2025

@bors r+ rollup=never p=1

@bors
Copy link
Collaborator

bors commented Jul 24, 2025

📌 Commit 156e2a6 has been approved by cuviper

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 24, 2025
@bors
Copy link
Collaborator

bors commented Jul 25, 2025

⌛ Testing commit 156e2a6 with merge 4229c2e...

@bors
Copy link
Collaborator

bors commented Jul 25, 2025

☀️ Test successful - checks-actions
Approved by: cuviper
Pushing 4229c2e to beta...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jul 25, 2025
@bors bors merged commit 4229c2e into rust-lang:beta Jul 25, 2025
11 checks passed
@rustbot rustbot added this to the 1.89.0 milestone Jul 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-attributes Area: Attributes (`#[…]`, `#![…]`) merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants