]> git.proxmox.com Git - rustc.git/blob - src/test/ui/asm/asm-parse-errors.rs
New upstream version 1.43.0+dfsg1
[rustc.git] / src / test / ui / asm / asm-parse-errors.rs
1 #![feature(asm)]
2
3 fn main() {
4 asm!(); //~ ERROR requires a string literal as an argument
5 asm!("nop" : struct); //~ ERROR expected string literal
6 asm!("mov %eax, $$0x2" : struct); //~ ERROR expected string literal
7 asm!("mov %eax, $$0x2" : "={eax}" struct); //~ ERROR expected `(`
8 asm!("mov %eax, $$0x2" : "={eax}"(struct)); //~ ERROR expected expression
9 asm!("in %dx, %al" : "={al}"(result) : struct); //~ ERROR expected string literal
10 asm!("in %dx, %al" : "={al}"(result) : "{dx}" struct); //~ ERROR expected `(`
11 asm!("in %dx, %al" : "={al}"(result) : "{dx}"(struct)); //~ ERROR expected expression
12 asm!("mov $$0x200, %eax" : : : struct); //~ ERROR expected string literal
13 asm!("mov eax, 2" : "={eax}"(foo) : : : struct); //~ ERROR expected string literal
14 asm!(123); //~ ERROR inline assembly must be a string literal
15 }