rust/src/test/ui/asm/asm-parse-errors.stderr
Andy Russell 0a6fb84738
make panictry! private to libsyntax
This commit completely removes usage of the `panictry!` macro from
outside libsyntax. The macro causes parse errors to be fatal, so using
it in libsyntax_ext caused parse failures *within* a syntax extension to
be fatal, which is probably not intended.

Furthermore, this commit adds spans to diagnostics emitted by empty
extensions if they were missing, à la #56491.
2019-01-02 11:02:30 -05:00

69 lines
2.5 KiB
Plaintext

error: macro requires a string literal as an argument
--> $DIR/asm-parse-errors.rs:4:5
|
LL | asm!(); //~ ERROR requires a string literal as an argument
| ^^^^^^^ string literal required
error: expected string literal
--> $DIR/asm-parse-errors.rs:5:18
|
LL | asm!("nop" : struct); //~ ERROR expected string literal
| ^^^^^^ expected string literal
error: expected string literal
--> $DIR/asm-parse-errors.rs:6:30
|
LL | asm!("mov %eax, $$0x2" : struct); //~ ERROR expected string literal
| ^^^^^^ expected string literal
error: expected `(`, found keyword `struct`
--> $DIR/asm-parse-errors.rs:7:39
|
LL | asm!("mov %eax, $$0x2" : "={eax}" struct); //~ ERROR expected `(`
| ^^^^^^ expected `(`
error: expected expression, found keyword `struct`
--> $DIR/asm-parse-errors.rs:8:39
|
LL | asm!("mov %eax, $$0x2" : "={eax}"(struct)); //~ ERROR expected expression
| ^^^^^^ expected expression
error: expected string literal
--> $DIR/asm-parse-errors.rs:9:44
|
LL | asm!("in %dx, %al" : "={al}"(result) : struct); //~ ERROR expected string literal
| ^^^^^^ expected string literal
error: expected `(`, found keyword `struct`
--> $DIR/asm-parse-errors.rs:10:51
|
LL | asm!("in %dx, %al" : "={al}"(result) : "{dx}" struct); //~ ERROR expected `(`
| ^^^^^^ expected `(`
error: expected expression, found keyword `struct`
--> $DIR/asm-parse-errors.rs:11:51
|
LL | asm!("in %dx, %al" : "={al}"(result) : "{dx}"(struct)); //~ ERROR expected expression
| ^^^^^^ expected expression
error: expected string literal
--> $DIR/asm-parse-errors.rs:12:36
|
LL | asm!("mov $$0x200, %eax" : : : struct); //~ ERROR expected string literal
| ^^^^^^ expected string literal
error: expected string literal
--> $DIR/asm-parse-errors.rs:13:45
|
LL | asm!("mov eax, 2" : "={eax}"(foo) : : : struct); //~ ERROR expected string literal
| ^^^^^^ expected string literal
error: inline assembly must be a string literal
--> $DIR/asm-parse-errors.rs:14:10
|
LL | asm!(123); //~ ERROR inline assembly must be a string literal
| ^^^
error: aborting due to 11 previous errors