Skip to content

disable missing_transmute_annotations lint in local macros - #17683

Open
GTimothy wants to merge 1 commit into
rust-lang:masterfrom
GTimothy:missing_transmute_annotations-disable-in-local-macro
Open

disable missing_transmute_annotations lint in local macros#17683
GTimothy wants to merge 1 commit into
rust-lang:masterfrom
GTimothy:missing_transmute_annotations-disable-in-local-macro

Conversation

@GTimothy

@GTimothy GTimothy commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

As the name says, this disables the missing_transmute_annotations lint in local macros.

As discussed in rust-lang/rust#161677 and #17612,
this lint firing in local macros may be a generally bad idea: the point of the lint is that in order to ensure that the safety invariant holds, the transmute source and destination should be explicitly fixed.

In macros, the source or destination may very well be dynamic and dependent on the macro call, which means we cannot always promise safety.
Also, the lint may fire many times with different suggestions, one for each macro call which is very noisy.

Because this is an alternative solution to it, this closes #17612

My thanks to @CommanderStorm

changelog: [missing_transmute_annotations]: disable the lint in local macros

@rustbot rustbot added the S-waiting-on-community-reviews Status: This is awaiting for positive reviews from the community before a maintainer is assigned. label Sep 4, 2026
@rustbot

rustbot commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

Thanks for the pull request. A reviewer will take a look after it receives 2 community reviews.

In the meantime, we would highly appreciate if you could try to review any of PRs waiting on community reviews.

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Sep 4, 2026

@CommanderStorm CommanderStorm left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Community review: LGTM under the assumption that this is an FP and not just inteneded behaviour

View changes since this review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-community-reviews Status: This is awaiting for positive reviews from the community before a maintainer is assigned. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants