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