1- error: invalid `sym` operand
2- --> $DIR/type-check-2.rs:38:24
3- |
4- LL | asm!("{}", sym x);
5- | ^ is a local variable
6- |
7- = help: `sym` operands must refer to either a function or a static
8-
91error: arguments for inline assembly must be copyable
10- --> $DIR/type-check-2.rs:43 :32
2+ --> $DIR/type-check-2.rs:32 :32
113 |
124LL | asm!("{}", in(xmm_reg) SimdNonCopy(0.0, 0.0, 0.0, 0.0));
135 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
146 |
157 = note: `SimdNonCopy` does not implement the Copy trait
168
17- error: cannot use value of type `{closure@$DIR/type-check-2.rs:55 :28: 55 :36}` for inline assembly
18- --> $DIR/type-check-2.rs:55 :28
9+ error: cannot use value of type `{closure@$DIR/type-check-2.rs:44 :28: 44 :36}` for inline assembly
10+ --> $DIR/type-check-2.rs:44 :28
1911 |
2012LL | asm!("{}", in(reg) |x: i32| x);
2113 | ^^^^^^^^^^
2214 |
2315 = note: only integers, floats, SIMD vectors, pointers and function pointers can be used as arguments for inline assembly
2416
2517error: cannot use value of type `Vec<i32>` for inline assembly
26- --> $DIR/type-check-2.rs:57 :28
18+ --> $DIR/type-check-2.rs:46 :28
2719 |
2820LL | asm!("{}", in(reg) vec![0]);
2921 | ^^^^^^^
@@ -32,45 +24,37 @@ LL | asm!("{}", in(reg) vec![0]);
3224 = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
3325
3426error: cannot use value of type `(i32, i32, i32)` for inline assembly
35- --> $DIR/type-check-2.rs:59 :28
27+ --> $DIR/type-check-2.rs:48 :28
3628 |
3729LL | asm!("{}", in(reg) (1, 2, 3));
3830 | ^^^^^^^^^
3931 |
4032 = note: only integers, floats, SIMD vectors, pointers and function pointers can be used as arguments for inline assembly
4133
4234error: cannot use value of type `[i32; 3]` for inline assembly
43- --> $DIR/type-check-2.rs:61 :28
35+ --> $DIR/type-check-2.rs:50 :28
4436 |
4537LL | asm!("{}", in(reg) [1, 2, 3]);
4638 | ^^^^^^^^^
4739 |
4840 = note: only integers, floats, SIMD vectors, pointers and function pointers can be used as arguments for inline assembly
4941
5042error: cannot use value of type `fn() {main}` for inline assembly
51- --> $DIR/type-check-2.rs:69 :31
43+ --> $DIR/type-check-2.rs:58 :31
5244 |
5345LL | asm!("{}", inout(reg) f);
5446 | ^
5547 |
5648 = note: only integers, floats, SIMD vectors, pointers and function pointers can be used as arguments for inline assembly
5749
5850error: cannot use value of type `&mut i32` for inline assembly
59- --> $DIR/type-check-2.rs:72 :31
51+ --> $DIR/type-check-2.rs:61 :31
6052 |
6153LL | asm!("{}", inout(reg) r);
6254 | ^
6355 |
6456 = note: only integers, floats, SIMD vectors, pointers and function pointers can be used as arguments for inline assembly
6557
66- error: invalid `sym` operand
67- --> $DIR/type-check-2.rs:36:20
68- |
69- LL | asm!("{}", sym C);
70- | ^^^^^ is an `i32`
71- |
72- = help: `sym` operands must refer to either a function or a static
73-
7458error[E0381]: used binding `x` isn't initialized
7559 --> $DIR/type-check-2.rs:15:28
7660 |
@@ -113,15 +97,7 @@ help: consider changing this to be mutable
11397LL | let mut v: Vec<u64> = vec![0, 1, 2];
11498 | +++
11599
116- error: invalid `sym` operand
117- --> $DIR/type-check-2.rs:89:19
118- |
119- LL | global_asm!("{}", sym C);
120- | ^^^^^ is an `i32`
121- |
122- = help: `sym` operands must refer to either a function or a static
123-
124- error: aborting due to 13 previous errors
100+ error: aborting due to 10 previous errors
125101
126102Some errors have detailed explanations: E0381, E0596.
127103For more information about an error, try `rustc --explain E0381`.
0 commit comments