]> git.lizzy.rs Git - rust.git/blob - src/test/ui/asm/x86_64/type-check-2.stderr
Auto merge of #95454 - randomicon00:fix95444, r=wesleywiser
[rust.git] / src / test / ui / asm / x86_64 / type-check-2.stderr
1 error: arguments for inline assembly must be copyable
2   --> $DIR/type-check-2.rs:42:32
3    |
4 LL |         asm!("{}", in(xmm_reg) SimdNonCopy(0.0, 0.0, 0.0, 0.0));
5    |                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6    |
7    = note: `SimdNonCopy` does not implement the Copy trait
8
9 error: cannot use value of type `[closure@$DIR/type-check-2.rs:54:28: 54:38]` for inline assembly
10   --> $DIR/type-check-2.rs:54:28
11    |
12 LL |         asm!("{}", in(reg) |x: i32| x);
13    |                            ^^^^^^^^^^
14    |
15    = note: only integers, floats, SIMD vectors, pointers and function pointers can be used as arguments for inline assembly
16
17 error: cannot use value of type `Vec<i32>` for inline assembly
18   --> $DIR/type-check-2.rs:56:28
19    |
20 LL |         asm!("{}", in(reg) vec![0]);
21    |                            ^^^^^^^
22    |
23    = note: only integers, floats, SIMD vectors, pointers and function pointers can be used as arguments for inline assembly
24    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
25
26 error: cannot use value of type `(i32, i32, i32)` for inline assembly
27   --> $DIR/type-check-2.rs:58:28
28    |
29 LL |         asm!("{}", in(reg) (1, 2, 3));
30    |                            ^^^^^^^^^
31    |
32    = note: only integers, floats, SIMD vectors, pointers and function pointers can be used as arguments for inline assembly
33
34 error: cannot use value of type `[i32; 3]` for inline assembly
35   --> $DIR/type-check-2.rs:60:28
36    |
37 LL |         asm!("{}", in(reg) [1, 2, 3]);
38    |                            ^^^^^^^^^
39    |
40    = note: only integers, floats, SIMD vectors, pointers and function pointers can be used as arguments for inline assembly
41
42 error: cannot use value of type `fn() {main}` for inline assembly
43   --> $DIR/type-check-2.rs:68:31
44    |
45 LL |         asm!("{}", inout(reg) f);
46    |                               ^
47    |
48    = note: only integers, floats, SIMD vectors, pointers and function pointers can be used as arguments for inline assembly
49
50 error: cannot use value of type `&mut i32` for inline assembly
51   --> $DIR/type-check-2.rs:71:31
52    |
53 LL |         asm!("{}", inout(reg) r);
54    |                               ^
55    |
56    = note: only integers, floats, SIMD vectors, pointers and function pointers can be used as arguments for inline assembly
57
58 error: invalid `sym` operand
59   --> $DIR/type-check-2.rs:37:20
60    |
61 LL |         asm!("{}", sym C);
62    |                    ^^^^^ is an `i32`
63    |
64    = help: `sym` operands must refer to either a function or a static
65
66 error: invalid `sym` operand
67   --> $DIR/type-check-2.rs:88:19
68    |
69 LL | global_asm!("{}", sym C);
70    |                   ^^^^^ is an `i32`
71    |
72    = help: `sym` operands must refer to either a function or a static
73
74 error[E0381]: use of possibly-uninitialized variable: `x`
75   --> $DIR/type-check-2.rs:15:28
76    |
77 LL |         asm!("{}", in(reg) x);
78    |                            ^ use of possibly-uninitialized `x`
79
80 error[E0381]: use of possibly-uninitialized variable: `y`
81   --> $DIR/type-check-2.rs:18:9
82    |
83 LL |         asm!("{}", inout(reg) y);
84    |         ^^^^^^^^^^^^^^^^^^^^^^^^ use of possibly-uninitialized `y`
85
86 error[E0596]: cannot borrow `v` as mutable, as it is not declared as mutable
87   --> $DIR/type-check-2.rs:26:29
88    |
89 LL |         let v: Vec<u64> = vec![0, 1, 2];
90    |             - help: consider changing this to be mutable: `mut v`
91 LL |         asm!("{}", in(reg) v[0]);
92 LL |         asm!("{}", out(reg) v[0]);
93    |                             ^ cannot borrow as mutable
94
95 error[E0596]: cannot borrow `v` as mutable, as it is not declared as mutable
96   --> $DIR/type-check-2.rs:28:31
97    |
98 LL |         let v: Vec<u64> = vec![0, 1, 2];
99    |             - help: consider changing this to be mutable: `mut v`
100 ...
101 LL |         asm!("{}", inout(reg) v[0]);
102    |                               ^ cannot borrow as mutable
103
104 error: aborting due to 13 previous errors
105
106 Some errors have detailed explanations: E0381, E0596.
107 For more information about an error, try `rustc --explain E0381`.