Skip to content

Don't lint against named labels in naked_asm! #140871

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Amanieu
Copy link
Member

@Amanieu Amanieu commented May 9, 2025

Naked functions are allowed to define global labels, just like global_asm!.

@rustbot
Copy link
Collaborator

rustbot commented May 9, 2025

r? @davidtwco

rustbot has assigned @davidtwco.
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 May 9, 2025
@rust-log-analyzer

This comment has been minimized.

Naked functions are allowed to define global labels, just like
`global_asm!`.
@Amanieu Amanieu force-pushed the naked-asm-label branch from 7c3764e to 6541903 Compare May 9, 2025 22:11
@compiler-errors
Copy link
Member

The previous attempt to allow this functionality in #88169. The justification in this PR doesn't really address what has changed since then to now. Could you please flesh out an explanation that touches on some of what was discussed in that PR?

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 10, 2025
Comment on lines -174 to -175
// Trigger on naked fns too, even though they can't be inlined, reusing a
// label or LTO can cause labels to break
Copy link
Member

Choose a reason for hiding this comment

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

Why is this not a valid concern?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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.

5 participants