File: naked-functions.stderr

package info (click to toggle)
rustc 1.85.0%2Bdfsg3-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental, forky, sid, trixie
  • size: 893,396 kB
  • sloc: xml: 158,127; python: 35,830; javascript: 19,497; cpp: 19,002; sh: 17,245; ansic: 13,127; asm: 4,376; makefile: 1,051; perl: 29; lisp: 29; ruby: 19; sql: 11
file content (194 lines) | stat: -rw-r--r-- 6,908 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
error: the `in` operand cannot be used with `naked_asm!`
  --> $DIR/naked-functions.rs:47:29
   |
LL |     naked_asm!("/* {0} */", in(reg) a)
   |                             ^^ the `in` operand is not meaningful for global-scoped inline assembly, remove it

error: the `in` operand cannot be used with `naked_asm!`
  --> $DIR/naked-functions.rs:68:10
   |
LL |          in(reg) a,
   |          ^^ the `in` operand is not meaningful for global-scoped inline assembly, remove it

error: the `noreturn` option cannot be used with `naked_asm!`
  --> $DIR/naked-functions.rs:88:32
   |
LL |         naked_asm!("", options(noreturn));
   |                                ^^^^^^^^ the `noreturn` option is not meaningful for global-scoped inline assembly

error: the `nomem` option cannot be used with `naked_asm!`
  --> $DIR/naked-functions.rs:106:28
   |
LL |     naked_asm!("", options(nomem, preserves_flags));
   |                            ^^^^^ the `nomem` option is not meaningful for global-scoped inline assembly

error: the `preserves_flags` option cannot be used with `naked_asm!`
  --> $DIR/naked-functions.rs:106:35
   |
LL |     naked_asm!("", options(nomem, preserves_flags));
   |                                   ^^^^^^^^^^^^^^^ the `preserves_flags` option is not meaningful for global-scoped inline assembly

error: the `readonly` option cannot be used with `naked_asm!`
  --> $DIR/naked-functions.rs:113:28
   |
LL |     naked_asm!("", options(readonly, nostack), options(pure));
   |                            ^^^^^^^^ the `readonly` option is not meaningful for global-scoped inline assembly

error: the `nostack` option cannot be used with `naked_asm!`
  --> $DIR/naked-functions.rs:113:38
   |
LL |     naked_asm!("", options(readonly, nostack), options(pure));
   |                                      ^^^^^^^ the `nostack` option is not meaningful for global-scoped inline assembly

error: the `pure` option cannot be used with `naked_asm!`
  --> $DIR/naked-functions.rs:113:56
   |
LL |     naked_asm!("", options(readonly, nostack), options(pure));
   |                                                        ^^^^ the `pure` option is not meaningful for global-scoped inline assembly

error: the `may_unwind` option cannot be used with `naked_asm!`
  --> $DIR/naked-functions.rs:121:28
   |
LL |     naked_asm!("", options(may_unwind));
   |                            ^^^^^^^^^^ the `may_unwind` option is not meaningful for global-scoped inline assembly

error: this is a user specified error
  --> $DIR/naked-functions.rs:169:5
   |
LL |     compile_error!("this is a user specified error")
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: this is a user specified error
  --> $DIR/naked-functions.rs:175:5
   |
LL |     compile_error!("this is a user specified error");
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: asm template must be a string literal
  --> $DIR/naked-functions.rs:182:16
   |
LL |     naked_asm!(invalid_syntax)
   |                ^^^^^^^^^^^^^^

error[E0787]: the `asm!` macro is not allowed in naked functions
  --> $DIR/naked-functions.rs:13:5
   |
LL |     asm!("", options(raw));
   |     ^^^^^^^^^^^^^^^^^^^^^^ consider using the `naked_asm!` macro instead

error: patterns not allowed in naked function parameters
  --> $DIR/naked-functions.rs:25:5
   |
LL |     mut a: u32,
   |     ^^^^^

error: patterns not allowed in naked function parameters
  --> $DIR/naked-functions.rs:27:5
   |
LL |     &b: &i32,
   |     ^^

error: patterns not allowed in naked function parameters
  --> $DIR/naked-functions.rs:29:6
   |
LL |     (None | Some(_)): Option<std::ptr::NonNull<u8>>,
   |      ^^^^^^^^^^^^^^

error: patterns not allowed in naked function parameters
  --> $DIR/naked-functions.rs:31:5
   |
LL |     P { x, y }: P,
   |     ^^^^^^^^^^

error: referencing function parameters is not allowed in naked functions
  --> $DIR/naked-functions.rs:40:5
   |
LL |     a + 1
   |     ^
   |
   = help: follow the calling convention in asm block to use parameters

error[E0787]: naked functions must contain a single `naked_asm!` invocation
  --> $DIR/naked-functions.rs:38:1
   |
LL | pub unsafe extern "C" fn inc(a: u32) -> u32 {
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
LL |
LL |     a + 1
   |     ----- not allowed in naked functions

error[E0787]: naked functions must contain a single `naked_asm!` invocation
  --> $DIR/naked-functions.rs:52:1
   |
LL | pub unsafe extern "C" fn inc_closure(a: u32) -> u32 {
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
LL |
LL |     (|| a + 1)()
   |     ------------ not allowed in naked functions

error[E0787]: naked functions must contain a single `naked_asm!` invocation
  --> $DIR/naked-functions.rs:58:1
   |
LL | pub unsafe extern "C" fn unsupported_operands() {
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
LL |
LL |     let mut a = 0usize;
   |     ------------------- not allowed in naked functions
LL |     let mut b = 0usize;
   |     ------------------- not allowed in naked functions
LL |     let mut c = 0usize;
   |     ------------------- not allowed in naked functions
LL |     let mut d = 0usize;
   |     ------------------- not allowed in naked functions
LL |     let mut e = 0usize;
   |     ------------------- not allowed in naked functions

error[E0787]: naked functions must contain a single `naked_asm!` invocation
  --> $DIR/naked-functions.rs:80:1
   |
LL | pub extern "C" fn missing_assembly() {
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0787]: naked functions must contain a single `naked_asm!` invocation
  --> $DIR/naked-functions.rs:85:1
   |
LL | pub extern "C" fn too_many_asm_blocks() {
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
LL |         naked_asm!("");
   |         -------------- multiple `naked_asm!` invocations are not allowed in naked functions

error: referencing function parameters is not allowed in naked functions
  --> $DIR/naked-functions.rs:98:11
   |
LL |         *&y
   |           ^
   |
   = help: follow the calling convention in asm block to use parameters

error[E0787]: naked functions must contain a single `naked_asm!` invocation
  --> $DIR/naked-functions.rs:96:5
   |
LL |     pub extern "C" fn inner(y: usize) -> usize {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
LL |
LL |         *&y
   |         --- not allowed in naked functions

warning: Rust ABI is unsupported in naked functions
  --> $DIR/naked-functions.rs:126:1
   |
LL | pub unsafe fn default_abi() {
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: `#[warn(undefined_naked_function_abi)]` on by default

warning: Rust ABI is unsupported in naked functions
  --> $DIR/naked-functions.rs:132:1
   |
LL | pub unsafe fn rust_abi() {
   | ^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to 25 previous errors; 2 warnings emitted

For more information about this error, try `rustc --explain E0787`.