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