1 error[E0493]: destructors cannot be evaluated at compile-time
2 --> $DIR/min_const_fn.rs:37:25
4 LL | const fn into_inner(self) -> T { self.0 }
5 | ^^^^ constant functions cannot evaluate destructors
7 error[E0723]: mutable references in const fn are unstable
8 --> $DIR/min_const_fn.rs:39:36
10 LL | const fn get_mut(&mut self) -> &mut T { &mut self.0 }
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
16 error[E0493]: destructors cannot be evaluated at compile-time
17 --> $DIR/min_const_fn.rs:44:28
19 LL | const fn into_inner_lt(self) -> T { self.0 }
20 | ^^^^ constant functions cannot evaluate destructors
22 error[E0723]: mutable references in const fn are unstable
23 --> $DIR/min_const_fn.rs:46:42
25 LL | const fn get_mut_lt(&'a mut self) -> &mut T { &mut self.0 }
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
31 error[E0493]: destructors cannot be evaluated at compile-time
32 --> $DIR/min_const_fn.rs:51:27
34 LL | const fn into_inner_s(self) -> T { self.0 }
35 | ^^^^ constant functions cannot evaluate destructors
37 error[E0723]: mutable references in const fn are unstable
38 --> $DIR/min_const_fn.rs:53:38
40 LL | const fn get_mut_s(&mut self) -> &mut T { &mut self.0 }
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
46 error[E0723]: mutable references in const fn are unstable
47 --> $DIR/min_const_fn.rs:58:39
49 LL | const fn get_mut_sq(&mut self) -> &mut T { &mut self.0 }
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
55 error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable
56 --> $DIR/min_const_fn.rs:76:16
58 LL | const fn foo11<T: std::fmt::Display>(t: T) -> T { t }
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
64 error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable
65 --> $DIR/min_const_fn.rs:78:18
67 LL | const fn foo11_2<T: Send>(t: T) -> T { t }
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
73 error[E0723]: only int, `bool` and `char` operations are stable in const fn
74 --> $DIR/min_const_fn.rs:80:33
76 LL | const fn foo19(f: f32) -> f32 { f * 2.0 }
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
82 error[E0723]: only int, `bool` and `char` operations are stable in const fn
83 --> $DIR/min_const_fn.rs:82:35
85 LL | const fn foo19_2(f: f32) -> f32 { 2.0 - f }
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
91 error[E0723]: only int and `bool` operations are stable in const fn
92 --> $DIR/min_const_fn.rs:84:35
94 LL | const fn foo19_3(f: f32) -> f32 { -f }
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
100 error[E0723]: only int, `bool` and `char` operations are stable in const fn
101 --> $DIR/min_const_fn.rs:86:43
103 LL | const fn foo19_4(f: f32, g: f32) -> f32 { f / g }
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
109 error[E0723]: cannot access `static` items in const fn
110 --> $DIR/min_const_fn.rs:90:27
112 LL | const fn foo25() -> u32 { BAR }
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
118 error[E0723]: cannot access `static` items in const fn
119 --> $DIR/min_const_fn.rs:91:36
121 LL | const fn foo26() -> &'static u32 { &BAR }
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
127 error[E0723]: casting pointers to ints is unstable in const fn
128 --> $DIR/min_const_fn.rs:92:42
130 LL | const fn foo30(x: *const u32) -> usize { x as usize }
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
136 error[E0723]: casting pointers to ints is unstable in const fn
137 --> $DIR/min_const_fn.rs:94:63
139 LL | const fn foo30_with_unsafe(x: *const u32) -> usize { unsafe { x as usize } }
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
145 error[E0723]: casting pointers to ints is unstable in const fn
146 --> $DIR/min_const_fn.rs:96:42
148 LL | const fn foo30_2(x: *mut u32) -> usize { x as usize }
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
154 error[E0723]: casting pointers to ints is unstable in const fn
155 --> $DIR/min_const_fn.rs:98:63
157 LL | const fn foo30_2_with_unsafe(x: *mut u32) -> usize { unsafe { x as usize } }
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
163 error[E0723]: loops and conditional expressions are not stable in const fn
164 --> $DIR/min_const_fn.rs:100:38
166 LL | const fn foo30_4(b: bool) -> usize { if b { 1 } else { 42 } }
167 | ^^^^^^^^^^^^^^^^^^^^^^
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
172 error[E0723]: loops and conditional expressions are not stable in const fn
173 --> $DIR/min_const_fn.rs:102:29
175 LL | const fn foo30_5(b: bool) { while b { } }
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
181 error[E0723]: loops and conditional expressions are not stable in const fn
182 --> $DIR/min_const_fn.rs:104:44
184 LL | const fn foo36(a: bool, b: bool) -> bool { a && b }
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
190 error[E0723]: loops and conditional expressions are not stable in const fn
191 --> $DIR/min_const_fn.rs:106:44
193 LL | const fn foo37(a: bool, b: bool) -> bool { a || b }
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
199 error[E0723]: mutable references in const fn are unstable
200 --> $DIR/min_const_fn.rs:108:14
202 LL | const fn inc(x: &mut i32) { *x += 1 }
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
208 error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable
209 --> $DIR/min_const_fn.rs:113:6
211 LL | impl<T: std::fmt::Debug> Foo<T> {
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
217 error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable
218 --> $DIR/min_const_fn.rs:118:6
220 LL | impl<T: std::fmt::Debug + Sized> Foo<T> {
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
226 error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable
227 --> $DIR/min_const_fn.rs:123:6
229 LL | impl<T: Sync + Sized> Foo<T> {
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
235 error[E0723]: `impl Trait` in const fn is unstable
236 --> $DIR/min_const_fn.rs:129:24
238 LL | const fn no_rpit2() -> AlanTuring<impl std::fmt::Debug> { AlanTuring(0) }
239 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
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
244 error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable
245 --> $DIR/min_const_fn.rs:131:34
247 LL | const fn no_apit2(_x: AlanTuring<impl std::fmt::Debug>) {}
248 | ^^^^^^^^^^^^^^^^^^^^
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
253 error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable
254 --> $DIR/min_const_fn.rs:133:22
256 LL | const fn no_apit(_x: impl std::fmt::Debug) {}
257 | ^^^^^^^^^^^^^^^^^^^^
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
262 error[E0723]: `impl Trait` in const fn is unstable
263 --> $DIR/min_const_fn.rs:134:23
265 LL | const fn no_rpit() -> impl std::fmt::Debug {}
266 | ^^^^^^^^^^^^^^^^^^^^
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
271 error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable
272 --> $DIR/min_const_fn.rs:135:23
274 LL | const fn no_dyn_trait(_x: &dyn std::fmt::Debug) {}
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
280 error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable
281 --> $DIR/min_const_fn.rs:136:32
283 LL | const fn no_dyn_trait_ret() -> &'static dyn std::fmt::Debug { &() }
284 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
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
289 warning[E0515]: cannot return reference to temporary value
290 --> $DIR/min_const_fn.rs:136:63
292 LL | const fn no_dyn_trait_ret() -> &'static dyn std::fmt::Debug { &() }
295 | |temporary value created here
296 | returns a reference to data owned by the current function
298 = warning: this error has been downgraded to a warning for backwards compatibility with previous releases
299 = warning: this represents potential undefined behavior in your code and this warning will become a hard error in the future
300 = note: for more information, try `rustc --explain E0729`
302 error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable
303 --> $DIR/min_const_fn.rs:144:41
305 LL | const fn really_no_traits_i_mean_it() { (&() as &dyn std::fmt::Debug, ()).1 }
306 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
308 = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563
309 = help: add #![feature(const_fn)] to the crate attributes to enable
311 error[E0723]: function pointers in const fn are unstable
312 --> $DIR/min_const_fn.rs:147:21
314 LL | const fn no_fn_ptrs(_x: fn()) {}
317 = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563
318 = help: add #![feature(const_fn)] to the crate attributes to enable
320 error[E0723]: function pointers in const fn are unstable
321 --> $DIR/min_const_fn.rs:149:27
323 LL | const fn no_fn_ptrs2() -> fn() { fn foo() {} foo }
326 = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563
327 = help: add #![feature(const_fn)] to the crate attributes to enable
329 error: aborting due to 36 previous errors
331 Some errors have detailed explanations: E0515, E0723.
332 For more information about an error, try `rustc --explain E0515`.