]> git.proxmox.com Git - rustc.git/blob - src/test/ui/consts/min_const_fn/min_const_fn.stderr
New upstream version 1.41.1+dfsg1
[rustc.git] / src / test / ui / consts / min_const_fn / min_const_fn.stderr
1 error[E0493]: destructors cannot be evaluated at compile-time
2 --> $DIR/min_const_fn.rs:37:25
3 |
4 LL | const fn into_inner(self) -> T { self.0 }
5 | ^^^^ constant functions cannot evaluate destructors
6
7 error[E0723]: mutable references in const fn are unstable
8 --> $DIR/min_const_fn.rs:39:36
9 |
10 LL | const fn get_mut(&mut self) -> &mut T { &mut self.0 }
11 | ^^^^^^
12 |
13 = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563
14 = help: add `#![feature(const_fn)]` to the crate attributes to enable
15
16 error[E0493]: destructors cannot be evaluated at compile-time
17 --> $DIR/min_const_fn.rs:44:28
18 |
19 LL | const fn into_inner_lt(self) -> T { self.0 }
20 | ^^^^ constant functions cannot evaluate destructors
21
22 error[E0723]: mutable references in const fn are unstable
23 --> $DIR/min_const_fn.rs:46:42
24 |
25 LL | const fn get_mut_lt(&'a mut self) -> &mut T { &mut self.0 }
26 | ^^^^^^
27 |
28 = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563
29 = help: add `#![feature(const_fn)]` to the crate attributes to enable
30
31 error[E0493]: destructors cannot be evaluated at compile-time
32 --> $DIR/min_const_fn.rs:51:27
33 |
34 LL | const fn into_inner_s(self) -> T { self.0 }
35 | ^^^^ constant functions cannot evaluate destructors
36
37 error[E0723]: mutable references in const fn are unstable
38 --> $DIR/min_const_fn.rs:53:38
39 |
40 LL | const fn get_mut_s(&mut self) -> &mut T { &mut self.0 }
41 | ^^^^^^
42 |
43 = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563
44 = help: add `#![feature(const_fn)]` to the crate attributes to enable
45
46 error[E0723]: mutable references in const fn are unstable
47 --> $DIR/min_const_fn.rs:58:39
48 |
49 LL | const fn get_mut_sq(&mut self) -> &mut T { &mut self.0 }
50 | ^^^^^^
51 |
52 = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563
53 = help: add `#![feature(const_fn)]` to the crate attributes to enable
54
55 error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable
56 --> $DIR/min_const_fn.rs:76:16
57 |
58 LL | const fn foo11<T: std::fmt::Display>(t: T) -> T { t }
59 | ^
60 |
61 = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563
62 = help: add `#![feature(const_fn)]` to the crate attributes to enable
63
64 error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable
65 --> $DIR/min_const_fn.rs:78:18
66 |
67 LL | const fn foo11_2<T: Send>(t: T) -> T { t }
68 | ^
69 |
70 = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563
71 = help: add `#![feature(const_fn)]` to the crate attributes to enable
72
73 error[E0723]: only int, `bool` and `char` operations are stable in const fn
74 --> $DIR/min_const_fn.rs:80:33
75 |
76 LL | const fn foo19(f: f32) -> f32 { f * 2.0 }
77 | ^^^^^^^
78 |
79 = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563
80 = help: add `#![feature(const_fn)]` to the crate attributes to enable
81
82 error[E0723]: only int, `bool` and `char` operations are stable in const fn
83 --> $DIR/min_const_fn.rs:82:35
84 |
85 LL | const fn foo19_2(f: f32) -> f32 { 2.0 - f }
86 | ^^^^^^^
87 |
88 = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563
89 = help: add `#![feature(const_fn)]` to the crate attributes to enable
90
91 error[E0723]: only int and `bool` operations are stable in const fn
92 --> $DIR/min_const_fn.rs:84:35
93 |
94 LL | const fn foo19_3(f: f32) -> f32 { -f }
95 | ^^
96 |
97 = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563
98 = help: add `#![feature(const_fn)]` to the crate attributes to enable
99
100 error[E0723]: only int, `bool` and `char` operations are stable in const fn
101 --> $DIR/min_const_fn.rs:86:43
102 |
103 LL | const fn foo19_4(f: f32, g: f32) -> f32 { f / g }
104 | ^^^^^
105 |
106 = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563
107 = help: add `#![feature(const_fn)]` to the crate attributes to enable
108
109 error[E0723]: cannot access `static` items in const fn
110 --> $DIR/min_const_fn.rs:90:27
111 |
112 LL | const fn foo25() -> u32 { BAR }
113 | ^^^
114 |
115 = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563
116 = help: add `#![feature(const_fn)]` to the crate attributes to enable
117
118 error[E0723]: cannot access `static` items in const fn
119 --> $DIR/min_const_fn.rs:91:37
120 |
121 LL | const fn foo26() -> &'static u32 { &BAR }
122 | ^^^
123 |
124 = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563
125 = help: add `#![feature(const_fn)]` to the crate attributes to enable
126
127 error[E0723]: casting pointers to ints is unstable in const fn
128 --> $DIR/min_const_fn.rs:92:42
129 |
130 LL | const fn foo30(x: *const u32) -> usize { x as usize }
131 | ^^^^^^^^^^
132 |
133 = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563
134 = help: add `#![feature(const_fn)]` to the crate attributes to enable
135
136 error[E0723]: casting pointers to ints is unstable in const fn
137 --> $DIR/min_const_fn.rs:94:63
138 |
139 LL | const fn foo30_with_unsafe(x: *const u32) -> usize { unsafe { x as usize } }
140 | ^^^^^^^^^^
141 |
142 = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563
143 = help: add `#![feature(const_fn)]` to the crate attributes to enable
144
145 error[E0723]: casting pointers to ints is unstable in const fn
146 --> $DIR/min_const_fn.rs:96:42
147 |
148 LL | const fn foo30_2(x: *mut u32) -> usize { x as usize }
149 | ^^^^^^^^^^
150 |
151 = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563
152 = help: add `#![feature(const_fn)]` to the crate attributes to enable
153
154 error[E0723]: casting pointers to ints is unstable in const fn
155 --> $DIR/min_const_fn.rs:98:63
156 |
157 LL | const fn foo30_2_with_unsafe(x: *mut u32) -> usize { unsafe { x as usize } }
158 | ^^^^^^^^^^
159 |
160 = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563
161 = help: add `#![feature(const_fn)]` to the crate attributes to enable
162
163 error[E0723]: loops and conditional expressions are not stable in const fn
164 --> $DIR/min_const_fn.rs:101:44
165 |
166 LL | const fn foo36(a: bool, b: bool) -> bool { a && b }
167 | ^^^^^^
168 |
169 = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563
170 = help: add `#![feature(const_fn)]` to the crate attributes to enable
171
172 error[E0723]: loops and conditional expressions are not stable in const fn
173 --> $DIR/min_const_fn.rs:103:44
174 |
175 LL | const fn foo37(a: bool, b: bool) -> bool { a || b }
176 | ^^^^^^
177 |
178 = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563
179 = help: add `#![feature(const_fn)]` to the crate attributes to enable
180
181 error[E0723]: mutable references in const fn are unstable
182 --> $DIR/min_const_fn.rs:105:14
183 |
184 LL | const fn inc(x: &mut i32) { *x += 1 }
185 | ^
186 |
187 = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563
188 = help: add `#![feature(const_fn)]` to the crate attributes to enable
189
190 error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable
191 --> $DIR/min_const_fn.rs:110:6
192 |
193 LL | impl<T: std::fmt::Debug> Foo<T> {
194 | ^
195 |
196 = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563
197 = help: add `#![feature(const_fn)]` to the crate attributes to enable
198
199 error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable
200 --> $DIR/min_const_fn.rs:115:6
201 |
202 LL | impl<T: std::fmt::Debug + Sized> Foo<T> {
203 | ^
204 |
205 = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563
206 = help: add `#![feature(const_fn)]` to the crate attributes to enable
207
208 error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable
209 --> $DIR/min_const_fn.rs:120:6
210 |
211 LL | impl<T: Sync + Sized> Foo<T> {
212 | ^
213 |
214 = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563
215 = help: add `#![feature(const_fn)]` to the crate attributes to enable
216
217 error[E0723]: `impl Trait` in const fn is unstable
218 --> $DIR/min_const_fn.rs:126:24
219 |
220 LL | const fn no_rpit2() -> AlanTuring<impl std::fmt::Debug> { AlanTuring(0) }
221 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
222 |
223 = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563
224 = help: add `#![feature(const_fn)]` to the crate attributes to enable
225
226 error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable
227 --> $DIR/min_const_fn.rs:128:34
228 |
229 LL | const fn no_apit2(_x: AlanTuring<impl std::fmt::Debug>) {}
230 | ^^^^^^^^^^^^^^^^^^^^
231 |
232 = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563
233 = help: add `#![feature(const_fn)]` to the crate attributes to enable
234
235 error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable
236 --> $DIR/min_const_fn.rs:130:22
237 |
238 LL | const fn no_apit(_x: impl std::fmt::Debug) {}
239 | ^^^^^^^^^^^^^^^^^^^^
240 |
241 = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563
242 = help: add `#![feature(const_fn)]` to the crate attributes to enable
243
244 error[E0723]: `impl Trait` in const fn is unstable
245 --> $DIR/min_const_fn.rs:131:23
246 |
247 LL | const fn no_rpit() -> impl std::fmt::Debug {}
248 | ^^^^^^^^^^^^^^^^^^^^
249 |
250 = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563
251 = help: add `#![feature(const_fn)]` to the crate attributes to enable
252
253 error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable
254 --> $DIR/min_const_fn.rs:132:23
255 |
256 LL | const fn no_dyn_trait(_x: &dyn std::fmt::Debug) {}
257 | ^^
258 |
259 = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563
260 = help: add `#![feature(const_fn)]` to the crate attributes to enable
261
262 error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable
263 --> $DIR/min_const_fn.rs:133:32
264 |
265 LL | const fn no_dyn_trait_ret() -> &'static dyn std::fmt::Debug { &() }
266 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
267 |
268 = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563
269 = help: add `#![feature(const_fn)]` to the crate attributes to enable
270
271 error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable
272 --> $DIR/min_const_fn.rs:138:41
273 |
274 LL | const fn really_no_traits_i_mean_it() { (&() as &dyn std::fmt::Debug, ()).1 }
275 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
276 |
277 = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563
278 = help: add `#![feature(const_fn)]` to the crate attributes to enable
279
280 error[E0723]: function pointers in const fn are unstable
281 --> $DIR/min_const_fn.rs:141:21
282 |
283 LL | const fn no_fn_ptrs(_x: fn()) {}
284 | ^^
285 |
286 = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563
287 = help: add `#![feature(const_fn)]` to the crate attributes to enable
288
289 error[E0723]: function pointers in const fn are unstable
290 --> $DIR/min_const_fn.rs:143:27
291 |
292 LL | const fn no_fn_ptrs2() -> fn() { fn foo() {} foo }
293 | ^^^^
294 |
295 = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563
296 = help: add `#![feature(const_fn)]` to the crate attributes to enable
297
298 error: aborting due to 34 previous errors
299
300 Some errors have detailed explanations: E0493, E0723.
301 For more information about an error, try `rustc --explain E0493`.