]> git.proxmox.com Git - rustc.git/blame - src/test/ui/asm/aarch64/type-check-2.stderr
New upstream version 1.62.1+dfsg1
[rustc.git] / src / test / ui / asm / aarch64 / type-check-2.stderr
CommitLineData
f9f354fc 1error: arguments for inline assembly must be copyable
04454e1e 2 --> $DIR/type-check-2.rs:46:31
f9f354fc 3 |
c295e0f8
XL
4LL | asm!("{:v}", in(vreg) SimdNonCopy(0.0, 0.0, 0.0, 0.0));
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
f9f354fc
XL
6 |
7 = note: `SimdNonCopy` does not implement the Copy trait
8
04454e1e
FG
9error: 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
f9f354fc
XL
11 |
12LL | 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
1b1a35ee 17error: cannot use value of type `Vec<i32>` for inline assembly
04454e1e 18 --> $DIR/type-check-2.rs:60:28
f9f354fc
XL
19 |
20LL | 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
17df50a5 24 = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
f9f354fc
XL
25
26error: cannot use value of type `(i32, i32, i32)` for inline assembly
04454e1e 27 --> $DIR/type-check-2.rs:62:28
f9f354fc
XL
28 |
29LL | 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
34error: cannot use value of type `[i32; 3]` for inline assembly
04454e1e 35 --> $DIR/type-check-2.rs:64:28
f9f354fc
XL
36 |
37LL | 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
42error: cannot use value of type `fn() {main}` for inline assembly
04454e1e 43 --> $DIR/type-check-2.rs:72:31
f9f354fc
XL
44 |
45LL | 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
50error: cannot use value of type `&mut i32` for inline assembly
04454e1e 51 --> $DIR/type-check-2.rs:75:31
f9f354fc
XL
52 |
53LL | 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
04454e1e
FG
58error: invalid `sym` operand
59 --> $DIR/type-check-2.rs:41:20
f9f354fc
XL
60 |
61LL | asm!("{}", sym C);
04454e1e
FG
62 | ^^^^^ is an `i32`
63 |
64 = help: `sym` operands must refer to either a function or a static
f9f354fc 65
04454e1e
FG
66error: invalid `sym` operand
67 --> $DIR/type-check-2.rs:92:19
68 |
69LL | global_asm!("{}", sym C);
70 | ^^^^^ is an `i32`
f9f354fc 71 |
04454e1e 72 = help: `sym` operands must refer to either a function or a static
f9f354fc 73
f9f354fc 74error[E0381]: use of possibly-uninitialized variable: `x`
a2a8927a 75 --> $DIR/type-check-2.rs:19:28
f9f354fc
XL
76 |
77LL | asm!("{}", in(reg) x);
78 | ^ use of possibly-uninitialized `x`
79
80error[E0381]: use of possibly-uninitialized variable: `y`
a2a8927a 81 --> $DIR/type-check-2.rs:22:9
f9f354fc
XL
82 |
83LL | asm!("{}", inout(reg) y);
c295e0f8 84 | ^^^^^^^^^^^^^^^^^^^^^^^^ use of possibly-uninitialized `y`
f9f354fc
XL
85
86error[E0596]: cannot borrow `v` as mutable, as it is not declared as mutable
a2a8927a 87 --> $DIR/type-check-2.rs:30:29
f9f354fc
XL
88 |
89LL | let v: Vec<u64> = vec![0, 1, 2];
90 | - help: consider changing this to be mutable: `mut v`
91LL | asm!("{}", in(reg) v[0]);
92LL | asm!("{}", out(reg) v[0]);
93 | ^ cannot borrow as mutable
94
95error[E0596]: cannot borrow `v` as mutable, as it is not declared as mutable
a2a8927a 96 --> $DIR/type-check-2.rs:32:31
f9f354fc
XL
97 |
98LL | let v: Vec<u64> = vec![0, 1, 2];
99 | - help: consider changing this to be mutable: `mut v`
100...
101LL | asm!("{}", inout(reg) v[0]);
102 | ^ cannot borrow as mutable
103
17df50a5 104error: aborting due to 13 previous errors
f9f354fc
XL
105
106Some errors have detailed explanations: E0381, E0596.
107For more information about an error, try `rustc --explain E0381`.