Rollup merge of #69836 - JohnTitor:immediate-outputs, r=nagisa

Check if output is immediate value

Fixes #62046

r? @nagisa
This commit is contained in:
Mazdak Farrokhzad 2020-03-10 06:47:55 +01:00 committed by GitHub
commit 436f2ec58c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 30 additions and 2 deletions

View file

@ -0,0 +1,11 @@
// build-fail
// ignore-emscripten no asm! support
#![feature(asm)]
fn main() {
unsafe {
asm!("nop" : "+r"("r15"));
//~^ malformed inline assembly
}
}

View file

@ -0,0 +1,11 @@
error[E0668]: malformed inline assembly
--> $DIR/issue-62046.rs:8:9
|
LL | asm!("nop" : "+r"("r15"));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to previous error
For more information about this error, try `rustc --explain E0668`.