Rewrite E0019 example

Inline assembly is now the only user of E0019. What is it doing that
E0015 is not?
This commit is contained in:
Dylan MacKenzie 2020-09-29 21:09:45 -07:00
parent 1513904c1c
commit 7c6d685551

View File

@ -4,12 +4,14 @@ because the expression's value must be known at compile-time.
Erroneous code example:
```compile_fail,E0019
#![feature(box_syntax)]
#![feature(asm)]
fn main() {
struct MyOwned;
static STATIC11: Box<MyOwned> = box MyOwned; // error!
static STATIC11: i32 = {
let x: i32;
unsafe { asm!("mov rax, 2", out("rax") x) }; // error!
x
};
}
```