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:37
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:101:44
166 LL | const fn foo36(a: bool, b: bool) -> bool { a && b }
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:103:44
175 LL | const fn foo37(a: bool, b: bool) -> bool { a || 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]: mutable references in const fn are unstable
182 --> $DIR/min_const_fn.rs:105:14
184 LL | const fn inc(x: &mut i32) { *x += 1 }
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]: trait bounds other than `Sized` on const fn parameters are unstable
191 --> $DIR/min_const_fn.rs:110:6
193 LL | impl<T: std::fmt::Debug> Foo<T> {
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]: trait bounds other than `Sized` on const fn parameters are unstable
200 --> $DIR/min_const_fn.rs:115:6
202 LL | impl<T: std::fmt::Debug + Sized> Foo<T> {
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:120:6
211 LL | impl<T: Sync + Sized> 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]: `impl Trait` in const fn is unstable
218 --> $DIR/min_const_fn.rs:126:24
220 LL | const fn no_rpit2() -> AlanTuring<impl std::fmt::Debug> { AlanTuring(0) }
221 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
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:128:34
229 LL | const fn no_apit2(_x: AlanTuring<impl std::fmt::Debug>) {}
230 | ^^^^^^^^^^^^^^^^^^^^
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]: trait bounds other than `Sized` on const fn parameters are unstable
236 --> $DIR/min_const_fn.rs:130:22
238 LL | const fn no_apit(_x: impl std::fmt::Debug) {}
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]: `impl Trait` in const fn is unstable
245 --> $DIR/min_const_fn.rs:131:23
247 LL | const fn no_rpit() -> 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:132:23
256 LL | const fn no_dyn_trait(_x: &dyn std::fmt::Debug) {}
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]: trait bounds other than `Sized` on const fn parameters are unstable
263 --> $DIR/min_const_fn.rs:133:32
265 LL | const fn no_dyn_trait_ret() -> &'static dyn 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:138:41
274 LL | const fn really_no_traits_i_mean_it() { (&() as &dyn std::fmt::Debug, ()).1 }
275 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
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]: function pointers in const fn are unstable
281 --> $DIR/min_const_fn.rs:141:21
283 LL | const fn no_fn_ptrs(_x: fn()) {}
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 error[E0723]: function pointers in const fn are unstable
290 --> $DIR/min_const_fn.rs:143:27
292 LL | const fn no_fn_ptrs2() -> fn() { fn foo() {} foo }
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
298 error: aborting due to 34 previous errors
300 Some errors have detailed explanations: E0493, E0723.
301 For more information about an error, try `rustc --explain E0493`.