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 (see issue #57563)
8 --> $DIR/min_const_fn.rs:39:36
10 LL | const fn get_mut(&mut self) -> &mut T { &mut self.0 }
13 = help: add #![feature(const_fn)] to the crate attributes to enable
15 error[E0493]: destructors cannot be evaluated at compile-time
16 --> $DIR/min_const_fn.rs:44:28
18 LL | const fn into_inner_lt(self) -> T { self.0 }
19 | ^^^^ constant functions cannot evaluate destructors
21 error[E0723]: mutable references in const fn are unstable (see issue #57563)
22 --> $DIR/min_const_fn.rs:46:42
24 LL | const fn get_mut_lt(&'a mut self) -> &mut T { &mut self.0 }
27 = help: add #![feature(const_fn)] to the crate attributes to enable
29 error[E0493]: destructors cannot be evaluated at compile-time
30 --> $DIR/min_const_fn.rs:51:27
32 LL | const fn into_inner_s(self) -> T { self.0 }
33 | ^^^^ constant functions cannot evaluate destructors
35 error[E0723]: mutable references in const fn are unstable (see issue #57563)
36 --> $DIR/min_const_fn.rs:53:38
38 LL | const fn get_mut_s(&mut self) -> &mut T { &mut self.0 }
41 = help: add #![feature(const_fn)] to the crate attributes to enable
43 error[E0723]: mutable references in const fn are unstable (see issue #57563)
44 --> $DIR/min_const_fn.rs:58:39
46 LL | const fn get_mut_sq(&mut self) -> &mut T { &mut self.0 }
49 = help: add #![feature(const_fn)] to the crate attributes to enable
51 error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable (see issue #57563)
52 --> $DIR/min_const_fn.rs:76:16
54 LL | const fn foo11<T: std::fmt::Display>(t: T) -> T { t }
57 = help: add #![feature(const_fn)] to the crate attributes to enable
59 error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable (see issue #57563)
60 --> $DIR/min_const_fn.rs:78:18
62 LL | const fn foo11_2<T: Send>(t: T) -> T { t }
65 = help: add #![feature(const_fn)] to the crate attributes to enable
67 error[E0723]: only int, `bool` and `char` operations are stable in const fn (see issue #57563)
68 --> $DIR/min_const_fn.rs:80:33
70 LL | const fn foo19(f: f32) -> f32 { f * 2.0 }
73 = help: add #![feature(const_fn)] to the crate attributes to enable
75 error[E0723]: only int, `bool` and `char` operations are stable in const fn (see issue #57563)
76 --> $DIR/min_const_fn.rs:82:35
78 LL | const fn foo19_2(f: f32) -> f32 { 2.0 - f }
81 = help: add #![feature(const_fn)] to the crate attributes to enable
83 error[E0723]: only int and `bool` operations are stable in const fn (see issue #57563)
84 --> $DIR/min_const_fn.rs:84:35
86 LL | const fn foo19_3(f: f32) -> f32 { -f }
89 = help: add #![feature(const_fn)] to the crate attributes to enable
91 error[E0723]: only int, `bool` and `char` operations are stable in const fn (see issue #57563)
92 --> $DIR/min_const_fn.rs:86:43
94 LL | const fn foo19_4(f: f32, g: f32) -> f32 { f / g }
97 = help: add #![feature(const_fn)] to the crate attributes to enable
99 error[E0723]: cannot access `static` items in const fn (see issue #57563)
100 --> $DIR/min_const_fn.rs:90:27
102 LL | const fn foo25() -> u32 { BAR }
105 = help: add #![feature(const_fn)] to the crate attributes to enable
107 error[E0723]: cannot access `static` items in const fn (see issue #57563)
108 --> $DIR/min_const_fn.rs:91:36
110 LL | const fn foo26() -> &'static u32 { &BAR }
113 = help: add #![feature(const_fn)] to the crate attributes to enable
115 error[E0723]: casting pointers to ints is unstable in const fn (see issue #57563)
116 --> $DIR/min_const_fn.rs:92:42
118 LL | const fn foo30(x: *const u32) -> usize { x as usize }
121 = help: add #![feature(const_fn)] to the crate attributes to enable
123 error[E0723]: casting pointers to ints is unstable in const fn (see issue #57563)
124 --> $DIR/min_const_fn.rs:94:63
126 LL | const fn foo30_with_unsafe(x: *const u32) -> usize { unsafe { x as usize } }
129 = help: add #![feature(const_fn)] to the crate attributes to enable
131 error[E0723]: casting pointers to ints is unstable in const fn (see issue #57563)
132 --> $DIR/min_const_fn.rs:96:42
134 LL | const fn foo30_2(x: *mut u32) -> usize { x as usize }
137 = help: add #![feature(const_fn)] to the crate attributes to enable
139 error[E0723]: casting pointers to ints is unstable in const fn (see issue #57563)
140 --> $DIR/min_const_fn.rs:98:63
142 LL | const fn foo30_2_with_unsafe(x: *mut u32) -> usize { unsafe { x as usize } }
145 = help: add #![feature(const_fn)] to the crate attributes to enable
147 error[E0723]: `if`, `match`, `&&` and `||` are not stable in const fn (see issue #57563)
148 --> $DIR/min_const_fn.rs:100:38
150 LL | const fn foo30_4(b: bool) -> usize { if b { 1 } else { 42 } }
151 | ^^^^^^^^^^^^^^^^^^^^^^
153 = help: add #![feature(const_fn)] to the crate attributes to enable
155 error[E0723]: `if`, `match`, `&&` and `||` are not stable in const fn (see issue #57563)
156 --> $DIR/min_const_fn.rs:102:29
158 LL | const fn foo30_5(b: bool) { while b { } }
161 = help: add #![feature(const_fn)] to the crate attributes to enable
163 error[E0723]: `if`, `match`, `&&` and `||` are not stable in const fn (see issue #57563)
164 --> $DIR/min_const_fn.rs:104:44
166 LL | const fn foo36(a: bool, b: bool) -> bool { a && b }
169 = help: add #![feature(const_fn)] to the crate attributes to enable
171 error[E0723]: `if`, `match`, `&&` and `||` are not stable in const fn (see issue #57563)
172 --> $DIR/min_const_fn.rs:106:44
174 LL | const fn foo37(a: bool, b: bool) -> bool { a || b }
177 = help: add #![feature(const_fn)] to the crate attributes to enable
179 error[E0723]: mutable references in const fn are unstable (see issue #57563)
180 --> $DIR/min_const_fn.rs:108:14
182 LL | const fn inc(x: &mut i32) { *x += 1 }
185 = help: add #![feature(const_fn)] to the crate attributes to enable
187 error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable (see issue #57563)
188 --> $DIR/min_const_fn.rs:113:6
190 LL | impl<T: std::fmt::Debug> Foo<T> {
193 = help: add #![feature(const_fn)] to the crate attributes to enable
195 error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable (see issue #57563)
196 --> $DIR/min_const_fn.rs:118:6
198 LL | impl<T: std::fmt::Debug + Sized> Foo<T> {
201 = help: add #![feature(const_fn)] to the crate attributes to enable
203 error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable (see issue #57563)
204 --> $DIR/min_const_fn.rs:123:6
206 LL | impl<T: Sync + Sized> Foo<T> {
209 = help: add #![feature(const_fn)] to the crate attributes to enable
211 error[E0723]: `impl Trait` in const fn is unstable (see issue #57563)
212 --> $DIR/min_const_fn.rs:129:24
214 LL | const fn no_rpit2() -> AlanTuring<impl std::fmt::Debug> { AlanTuring(0) }
215 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
217 = help: add #![feature(const_fn)] to the crate attributes to enable
219 error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable (see issue #57563)
220 --> $DIR/min_const_fn.rs:131:34
222 LL | const fn no_apit2(_x: AlanTuring<impl std::fmt::Debug>) {}
223 | ^^^^^^^^^^^^^^^^^^^^
225 = help: add #![feature(const_fn)] to the crate attributes to enable
227 error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable (see issue #57563)
228 --> $DIR/min_const_fn.rs:133:22
230 LL | const fn no_apit(_x: impl std::fmt::Debug) {}
231 | ^^^^^^^^^^^^^^^^^^^^
233 = help: add #![feature(const_fn)] to the crate attributes to enable
235 error[E0723]: `impl Trait` in const fn is unstable (see issue #57563)
236 --> $DIR/min_const_fn.rs:134:23
238 LL | const fn no_rpit() -> impl std::fmt::Debug {}
239 | ^^^^^^^^^^^^^^^^^^^^
241 = help: add #![feature(const_fn)] to the crate attributes to enable
243 error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable (see issue #57563)
244 --> $DIR/min_const_fn.rs:135:23
246 LL | const fn no_dyn_trait(_x: &dyn std::fmt::Debug) {}
249 = help: add #![feature(const_fn)] to the crate attributes to enable
251 error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable (see issue #57563)
252 --> $DIR/min_const_fn.rs:136:32
254 LL | const fn no_dyn_trait_ret() -> &'static dyn std::fmt::Debug { &() }
255 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
257 = help: add #![feature(const_fn)] to the crate attributes to enable
259 error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable (see issue #57563)
260 --> $DIR/min_const_fn.rs:141:41
262 LL | const fn really_no_traits_i_mean_it() { (&() as &std::fmt::Debug, ()).1 }
263 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
265 = help: add #![feature(const_fn)] to the crate attributes to enable
267 error[E0723]: function pointers in const fn are unstable (see issue #57563)
268 --> $DIR/min_const_fn.rs:144:21
270 LL | const fn no_fn_ptrs(_x: fn()) {}
273 = help: add #![feature(const_fn)] to the crate attributes to enable
275 error[E0723]: function pointers in const fn are unstable (see issue #57563)
276 --> $DIR/min_const_fn.rs:146:27
278 LL | const fn no_fn_ptrs2() -> fn() { fn foo() {} foo }
281 = help: add #![feature(const_fn)] to the crate attributes to enable
283 error: aborting due to 36 previous errors
285 Some errors occurred: E0493, E0723.
286 For more information about an error, try `rustc --explain E0493`.