We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1513904 commit 7c6d685Copy full SHA for 7c6d685
compiler/rustc_error_codes/src/error_codes/E0019.md
@@ -4,12 +4,14 @@ because the expression's value must be known at compile-time.
4
Erroneous code example:
5
6
```compile_fail,E0019
7
-#![feature(box_syntax)]
+#![feature(asm)]
8
9
fn main() {
10
- struct MyOwned;
11
-
12
- static STATIC11: Box<MyOwned> = box MyOwned; // error!
+ static STATIC11: i32 = {
+ let x: i32;
+ unsafe { asm!("mov rax, 2", out("rax") x) }; // error!
13
+ x
14
+ };
15
}
16
```
17
0 commit comments