Skip to content

Conversation

Amanieu
Copy link
Member

@Amanieu Amanieu commented Jun 11, 2020

We require all arguments to an asm! to be used in the template string, just like format strings. However in some cases (e.g. black_box) it may be desirable to have asm! arguments that are not used in the template string.

Currently this is a hard error rather than a lint since #[allow] does not work on macros (#63221), so this PR suggests using the unused arguments in an asm comment as a workaround.

r? @petrochenkov

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 11, 2020
@petrochenkov
Copy link
Contributor

@bors r+

@bors
Copy link
Collaborator

bors commented Jun 11, 2020

📌 Commit ddacc67 has been approved by petrochenkov

@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, 2020
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 11, 2020
Rollup of 7 pull requests

Successful merges:

 - rust-lang#72180 (remove extra space from crate-level doctest names)
 - rust-lang#73012 (Show `SyntaxContext` in formatted `Span` debug output)
 - rust-lang#73097 (Try_run must only be used if toolstate is populated)
 - rust-lang#73169 (Handle assembler warnings properly)
 - rust-lang#73182 (Track span of function in method calls, and use this in #[track_caller])
 - rust-lang#73207 (Clean up E0648 explanation)
 - rust-lang#73230 (Suggest including unused asm arguments in a comment to avoid error)

Failed merges:

r? @ghost
@bors bors merged commit 8650df5 into rust-lang:master Jun 11, 2020
@cuviper cuviper added this to the 1.46 milestone May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants