Skip to content
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

Ensure ASM syntax detect global_asm! and asm! only on x86 architectures #12305

Merged
merged 1 commit into from Feb 17, 2024

Conversation

beetrees
Copy link
Contributor

The ASM syntax lint is only relevant on x86 architectures, so this PR ensures it doesn't trigger on other architectures. This PR also makes the lints check global_asm! items as well as asm! expressions.

changelog: Check global_asm! items in the ASM syntax lints, and fix false positives on non-x86 architectures.

@rustbot
Copy link
Collaborator

rustbot commented Feb 16, 2024

r? @Manishearth

rustbot has assigned @Manishearth.
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 the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Feb 16, 2024
Copy link
Member

@Manishearth Manishearth left a comment

Choose a reason for hiding this comment

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

Not 100% convinced this is the way to do it but I can't see an easier way to detect cfgs.

clippy_lints/src/asm_syntax.rs Outdated Show resolved Hide resolved
@Manishearth
Copy link
Member

@bors r+

oh I somehow missed it was used twice

but this is fine for now

@bors
Copy link
Collaborator

bors commented Feb 17, 2024

📌 Commit 9b5e4c6 has been approved by Manishearth

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented Feb 17, 2024

⌛ Testing commit 9b5e4c6 with merge 5471e06...

@bors
Copy link
Collaborator

bors commented Feb 17, 2024

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: Manishearth
Pushing 5471e06 to master...

@bors bors merged commit 5471e06 into rust-lang:master Feb 17, 2024
5 checks passed
@beetrees beetrees deleted the asm-syntax branch February 17, 2024 02:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

None yet

4 participants