]> git.lizzy.rs Git - rust.git/blob - src/test/ui/asm/aarch64/type-check-2.stderr
Rollup merge of #87910 - iago-lito:mark_unsafe_nonzero_arithmetics_as_const, r=joshtr...
[rust.git] / src / test / ui / asm / aarch64 / type-check-2.stderr
1 error: arguments for inline assembly must be copyable
2   --> $DIR/type-check-2.rs:46:31
3    |
4 LL |         asm!("{:v}", in(vreg) 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:58:28: 58:38]` for inline assembly
10   --> $DIR/type-check-2.rs:58: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:60: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:62: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:64: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:72: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:75: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: asm `sym` operand must point to a fn or static
59   --> $DIR/type-check-2.rs:39:24
60    |
61 LL |         asm!("{}", sym C);
62    |                        ^
63
64 error: asm `sym` operand must point to a fn or static
65   --> $DIR/type-check-2.rs:41:24
66    |
67 LL |         asm!("{}", sym x);
68    |                        ^
69
70 error[E0381]: use of possibly-uninitialized variable: `x`
71   --> $DIR/type-check-2.rs:17:28
72    |
73 LL |         asm!("{}", in(reg) x);
74    |                            ^ use of possibly-uninitialized `x`
75
76 error[E0381]: use of possibly-uninitialized variable: `y`
77   --> $DIR/type-check-2.rs:20:9
78    |
79 LL |         asm!("{}", inout(reg) y);
80    |         ^^^^^^^^^^^^^^^^^^^^^^^^^ use of possibly-uninitialized `y`
81
82 error[E0596]: cannot borrow `v` as mutable, as it is not declared as mutable
83   --> $DIR/type-check-2.rs:28:29
84    |
85 LL |         let v: Vec<u64> = vec![0, 1, 2];
86    |             - help: consider changing this to be mutable: `mut v`
87 LL |         asm!("{}", in(reg) v[0]);
88 LL |         asm!("{}", out(reg) v[0]);
89    |                             ^ cannot borrow as mutable
90
91 error[E0596]: cannot borrow `v` as mutable, as it is not declared as mutable
92   --> $DIR/type-check-2.rs:30:31
93    |
94 LL |         let v: Vec<u64> = vec![0, 1, 2];
95    |             - help: consider changing this to be mutable: `mut v`
96 ...
97 LL |         asm!("{}", inout(reg) v[0]);
98    |                               ^ cannot borrow as mutable
99
100 error: aborting due to 13 previous errors
101
102 Some errors have detailed explanations: E0381, E0596.
103 For more information about an error, try `rustc --explain E0381`.