Skip to content

[r+] Disallow a form of invalid asm! macro #21144

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

Merged
merged 1 commit into from
Jan 16, 2015
Merged

Conversation

nagisa
Copy link
Member

@nagisa nagisa commented Jan 14, 2015

Fixes #21045

@rust-highfive
Copy link
Contributor

r? @nick29581

(rust_highfive has picked a reviewer for you, use r? to override)

@pczarn
Copy link
Contributor

pczarn commented Jan 14, 2015

This is worth labelling as a "breaking-change".
For me, concat! works as well, but some people may write code like this:

asm!("nop;"
     "nop;");

@nagisa
Copy link
Member Author

nagisa commented Jan 14, 2015

It doesn’t work like that. It will currently only use the last string encountered as the assembly string. See #21045 for details.

EDIT: For all its worth

asm!("nop;
      nop;"); 

works just as fine

@pczarn
Copy link
Contributor

pczarn commented Jan 14, 2015

Oh, it's certainly a bug.

@nagisa nagisa changed the title Disallow a form of invalid asm! macro [r+] Disallow a form of invalid asm! macro Jan 14, 2015
@nrc nrc assigned alexcrichton and unassigned nrc Jan 14, 2015
alexcrichton added a commit to alexcrichton/rust that referenced this pull request Jan 15, 2015
@bors bors merged commit 31261fd into rust-lang:master Jan 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

asm!("asdflol" "nop"); compiles
6 participants