Skip to content

Conversation

folkertdev
Copy link
Contributor

fixes #142182

If an attribute is re-emitted by a macro, the incorrect edition was used to emit warnings for unsafe attributes.

This logic was introduced in #139718

cc @compiler-errors @ehuss

If an attribute is re-emitted by a macro, the incorrect edition was used to emit warnings for unsafe attributes
@rustbot
Copy link
Collaborator

rustbot commented Jun 9, 2025

r? @compiler-errors

rustbot has assigned @compiler-errors.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jun 9, 2025
@compiler-errors
Copy link
Member

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Jun 11, 2025

📌 Commit 2c82574 has been approved by compiler-errors

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 Jun 11, 2025
bors added a commit that referenced this pull request Jun 12, 2025
Rollup of 10 pull requests

Successful merges:

 - #141307 (Add method to retrieve body of closure in stable-mir)
 - #142040 (transmutability: shift abstraction boundary)
 - #142066 (More simple 2015 edition test decoupling)
 - #142157 (rustc_resolve: Improve `resolve_const_param_in_non_trivial_anon_const` wording)
 - #142217 (`tests/ui`: A New Order [10/N])
 - #142219 (`tests/ui`: A New Order [11/N])
 - #142261 (use correct edition when warning for unsafe attributes)
 - #142303 (Assorted bootstrap cleanups (step 1))
 - #142318 (Cleanup `rust-src` remapping and real dir)
 - #142352 (compiler: Make `c_int_width` an integer)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 75c186b into rust-lang:master Jun 12, 2025
10 checks passed
@rustbot rustbot added this to the 1.89.0 milestone Jun 12, 2025
rust-timer added a commit that referenced this pull request Jun 12, 2025
Rollup merge of #142261 - folkertdev:unstable-attr-correct-edition, r=compiler-errors

use correct edition when warning for unsafe attributes

fixes #142182

If an attribute is re-emitted by a macro, the incorrect edition was used to emit warnings for unsafe attributes.

This logic was introduced in #139718

cc `@compiler-errors` `@ehuss`
@compiler-errors compiler-errors added the beta-nominated Nominated for backporting to the compiler in the beta channel. label Jun 12, 2025
@apiraino
Copy link
Contributor

Beta backport accepted as per compiler team on Zulip. A backport PR will be authored by the release team at the end of the current development cycle. Backport labels handled by them.

@rustbot label +beta-accepted

@rustbot rustbot added the beta-accepted Accepted for backporting to the compiler in the beta channel. label Jun 12, 2025
@cuviper cuviper mentioned this pull request Jun 12, 2025
@cuviper cuviper modified the milestones: 1.89.0, 1.88.0 Jun 12, 2025
@cuviper cuviper removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Jun 12, 2025
bors added a commit that referenced this pull request Jun 13, 2025
[beta] backports

- x86 (32/64): go back to passing SIMD vectors by-ptr #141309
- use correct edition when warning for unsafe attributes #142261

r? cuviper
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta-accepted Accepted for backporting to the compiler in the beta channel. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

#[no_mangle] in thread_local! requires unsafe wrapping in edition 2021
6 participants