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 | ^^^^ - value is dropped here
7 | constant functions cannot evaluate destructors
9 error[E0723]: mutable references in const fn are unstable
10 --> $DIR/min_const_fn.rs:39:36
12 LL | const fn get_mut(&mut self) -> &mut T { &mut self.0 }
15 = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
16 = help: add `#![feature(const_fn)]` to the crate attributes to enable
18 error[E0493]: destructors cannot be evaluated at compile-time
19 --> $DIR/min_const_fn.rs:44:28
21 LL | const fn into_inner_lt(self) -> T { self.0 }
22 | ^^^^ - value is dropped here
24 | constant functions cannot evaluate destructors
26 error[E0723]: mutable references in const fn are unstable
27 --> $DIR/min_const_fn.rs:46:42
29 LL | const fn get_mut_lt(&'a mut self) -> &mut T { &mut self.0 }
32 = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
33 = help: add `#![feature(const_fn)]` to the crate attributes to enable
35 error[E0493]: destructors cannot be evaluated at compile-time
36 --> $DIR/min_const_fn.rs:51:27
38 LL | const fn into_inner_s(self) -> T { self.0 }
39 | ^^^^ - value is dropped here
41 | constant functions cannot evaluate destructors
43 error[E0723]: mutable references in const fn are unstable
44 --> $DIR/min_const_fn.rs:53:38
46 LL | const fn get_mut_s(&mut self) -> &mut T { &mut self.0 }
49 = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
50 = help: add `#![feature(const_fn)]` to the crate attributes to enable
52 error[E0723]: mutable references in const fn are unstable
53 --> $DIR/min_const_fn.rs:58:39
55 LL | const fn get_mut_sq(&mut self) -> &mut T { &mut self.0 }
58 = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
59 = help: add `#![feature(const_fn)]` to the crate attributes to enable
61 error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable
62 --> $DIR/min_const_fn.rs:76:16
64 LL | const fn foo11<T: std::fmt::Display>(t: T) -> T { t }
67 = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
68 = help: add `#![feature(const_fn)]` to the crate attributes to enable
70 error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable
71 --> $DIR/min_const_fn.rs:78:18
73 LL | const fn foo11_2<T: Send>(t: T) -> T { t }
76 = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
77 = help: add `#![feature(const_fn)]` to the crate attributes to enable
79 error[E0723]: only int, `bool` and `char` operations are stable in const fn
80 --> $DIR/min_const_fn.rs:80:33
82 LL | const fn foo19(f: f32) -> f32 { f * 2.0 }
85 = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
86 = help: add `#![feature(const_fn)]` to the crate attributes to enable
88 error[E0723]: only int, `bool` and `char` operations are stable in const fn
89 --> $DIR/min_const_fn.rs:82:35
91 LL | const fn foo19_2(f: f32) -> f32 { 2.0 - f }
94 = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
95 = help: add `#![feature(const_fn)]` to the crate attributes to enable
97 error[E0723]: only int and `bool` operations are stable in const fn
98 --> $DIR/min_const_fn.rs:84:35
100 LL | const fn foo19_3(f: f32) -> f32 { -f }
103 = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
104 = help: add `#![feature(const_fn)]` to the crate attributes to enable
106 error[E0723]: only int, `bool` and `char` operations are stable in const fn
107 --> $DIR/min_const_fn.rs:86:43
109 LL | const fn foo19_4(f: f32, g: f32) -> f32 { f / g }
112 = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
113 = help: add `#![feature(const_fn)]` to the crate attributes to enable
115 error[E0723]: cannot access `static` items in const fn
116 --> $DIR/min_const_fn.rs:90:27
118 LL | const fn foo25() -> u32 { BAR }
121 = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
122 = help: add `#![feature(const_fn)]` to the crate attributes to enable
124 error[E0723]: cannot access `static` items in const fn
125 --> $DIR/min_const_fn.rs:91:37
127 LL | const fn foo26() -> &'static u32 { &BAR }
130 = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
131 = help: add `#![feature(const_fn)]` to the crate attributes to enable
133 error[E0723]: casting pointers to ints is unstable in const fn
134 --> $DIR/min_const_fn.rs:92:42
136 LL | const fn foo30(x: *const u32) -> usize { x as usize }
139 = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
140 = help: add `#![feature(const_fn)]` to the crate attributes to enable
142 error[E0723]: casting pointers to ints is unstable in const fn
143 --> $DIR/min_const_fn.rs:94:63
145 LL | const fn foo30_with_unsafe(x: *const u32) -> usize { unsafe { x as usize } }
148 = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
149 = help: add `#![feature(const_fn)]` to the crate attributes to enable
151 error[E0723]: casting pointers to ints is unstable in const fn
152 --> $DIR/min_const_fn.rs:96:42
154 LL | const fn foo30_2(x: *mut u32) -> usize { x as usize }
157 = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
158 = help: add `#![feature(const_fn)]` to the crate attributes to enable
160 error[E0723]: casting pointers to ints is unstable in const fn
161 --> $DIR/min_const_fn.rs:98:63
163 LL | const fn foo30_2_with_unsafe(x: *mut u32) -> usize { unsafe { x as usize } }
166 = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
167 = help: add `#![feature(const_fn)]` to the crate attributes to enable
169 error[E0723]: mutable references in const fn are unstable
170 --> $DIR/min_const_fn.rs:101:14
172 LL | const fn inc(x: &mut i32) { *x += 1 }
175 = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
176 = help: add `#![feature(const_fn)]` to the crate attributes to enable
178 error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable
179 --> $DIR/min_const_fn.rs:110:6
181 LL | impl<T: std::fmt::Debug> Foo<T> {
184 = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
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
188 --> $DIR/min_const_fn.rs:115:6
190 LL | impl<T: std::fmt::Debug + Sized> Foo<T> {
193 = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
194 = help: add `#![feature(const_fn)]` to the crate attributes to enable
196 error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable
197 --> $DIR/min_const_fn.rs:120:6
199 LL | impl<T: Sync + Sized> Foo<T> {
202 = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
203 = help: add `#![feature(const_fn)]` to the crate attributes to enable
205 error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable
206 --> $DIR/min_const_fn.rs:126:34
208 LL | const fn no_apit2(_x: AlanTuring<impl std::fmt::Debug>) {}
209 | ^^^^^^^^^^^^^^^^^^^^
211 = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
212 = help: add `#![feature(const_fn)]` to the crate attributes to enable
214 error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable
215 --> $DIR/min_const_fn.rs:128:22
217 LL | const fn no_apit(_x: impl std::fmt::Debug) {}
218 | ^^^^^^^^^^^^^^^^^^^^
220 = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
221 = help: add `#![feature(const_fn)]` to the crate attributes to enable
223 error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable
224 --> $DIR/min_const_fn.rs:129:23
226 LL | const fn no_dyn_trait(_x: &dyn std::fmt::Debug) {}
229 = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
230 = help: add `#![feature(const_fn)]` to the crate attributes to enable
232 error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable
233 --> $DIR/min_const_fn.rs:130:32
235 LL | const fn no_dyn_trait_ret() -> &'static dyn std::fmt::Debug { &() }
236 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
238 = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
239 = help: add `#![feature(const_fn)]` to the crate attributes to enable
241 error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable
242 --> $DIR/min_const_fn.rs:135:41
244 LL | const fn really_no_traits_i_mean_it() { (&() as &dyn std::fmt::Debug, ()).1 }
245 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
247 = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
248 = help: add `#![feature(const_fn)]` to the crate attributes to enable
250 error[E0723]: function pointers in const fn are unstable
251 --> $DIR/min_const_fn.rs:138:21
253 LL | const fn no_fn_ptrs(_x: fn()) {}
256 = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
257 = help: add `#![feature(const_fn)]` to the crate attributes to enable
259 error[E0723]: function pointers in const fn are unstable
260 --> $DIR/min_const_fn.rs:140:27
262 LL | const fn no_fn_ptrs2() -> fn() { fn foo() {} foo }
265 = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
266 = help: add `#![feature(const_fn)]` to the crate attributes to enable
268 error: aborting due to 30 previous errors
270 Some errors have detailed explanations: E0493, E0723.
271 For more information about an error, try `rustc --explain E0493`.