]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/min_const_fn/min_const_fn.stderr
Auto merge of #73456 - tmiasko:musl-libdir, r=Mark-Simulacrum
[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    |                         ^^^^                - value is dropped here
6    |                         |
7    |                         constant functions cannot evaluate destructors
8
9 error[E0723]: mutable references in const fn are unstable
10   --> $DIR/min_const_fn.rs:39:36
11    |
12 LL |     const fn get_mut(&mut self) -> &mut T { &mut self.0 }
13    |                                    ^^^^^^
14    |
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
17
18 error[E0493]: destructors cannot be evaluated at compile-time
19   --> $DIR/min_const_fn.rs:44:28
20    |
21 LL |     const fn into_inner_lt(self) -> T { self.0 }
22    |                            ^^^^                - value is dropped here
23    |                            |
24    |                            constant functions cannot evaluate destructors
25
26 error[E0723]: mutable references in const fn are unstable
27   --> $DIR/min_const_fn.rs:46:42
28    |
29 LL |     const fn get_mut_lt(&'a mut self) -> &mut T { &mut self.0 }
30    |                                          ^^^^^^
31    |
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
34
35 error[E0493]: destructors cannot be evaluated at compile-time
36   --> $DIR/min_const_fn.rs:51:27
37    |
38 LL |     const fn into_inner_s(self) -> T { self.0 }
39    |                           ^^^^                - value is dropped here
40    |                           |
41    |                           constant functions cannot evaluate destructors
42
43 error[E0723]: mutable references in const fn are unstable
44   --> $DIR/min_const_fn.rs:53:38
45    |
46 LL |     const fn get_mut_s(&mut self) -> &mut T { &mut self.0 }
47    |                                      ^^^^^^
48    |
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
51
52 error[E0723]: mutable references in const fn are unstable
53   --> $DIR/min_const_fn.rs:58:39
54    |
55 LL |     const fn get_mut_sq(&mut self) -> &mut T { &mut self.0 }
56    |                                       ^^^^^^
57    |
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
60
61 error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable
62   --> $DIR/min_const_fn.rs:76:16
63    |
64 LL | const fn foo11<T: std::fmt::Display>(t: T) -> T { t }
65    |                ^
66    |
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
69
70 error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable
71   --> $DIR/min_const_fn.rs:78:18
72    |
73 LL | const fn foo11_2<T: Send>(t: T) -> T { t }
74    |                  ^
75    |
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
78
79 error[E0723]: only int, `bool` and `char` operations are stable in const fn
80   --> $DIR/min_const_fn.rs:80:33
81    |
82 LL | const fn foo19(f: f32) -> f32 { f * 2.0 }
83    |                                 ^^^^^^^
84    |
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
87
88 error[E0723]: only int, `bool` and `char` operations are stable in const fn
89   --> $DIR/min_const_fn.rs:82:35
90    |
91 LL | const fn foo19_2(f: f32) -> f32 { 2.0 - f }
92    |                                   ^^^^^^^
93    |
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
96
97 error[E0723]: only int and `bool` operations are stable in const fn
98   --> $DIR/min_const_fn.rs:84:35
99    |
100 LL | const fn foo19_3(f: f32) -> f32 { -f }
101    |                                   ^^
102    |
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
105
106 error[E0723]: only int, `bool` and `char` operations are stable in const fn
107   --> $DIR/min_const_fn.rs:86:43
108    |
109 LL | const fn foo19_4(f: f32, g: f32) -> f32 { f / g }
110    |                                           ^^^^^
111    |
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
114
115 error[E0723]: cannot access `static` items in const fn
116   --> $DIR/min_const_fn.rs:90:27
117    |
118 LL | const fn foo25() -> u32 { BAR }
119    |                           ^^^
120    |
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
123
124 error[E0723]: cannot access `static` items in const fn
125   --> $DIR/min_const_fn.rs:91:37
126    |
127 LL | const fn foo26() -> &'static u32 { &BAR }
128    |                                     ^^^
129    |
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
132
133 error[E0723]: casting pointers to ints is unstable in const fn
134   --> $DIR/min_const_fn.rs:92:42
135    |
136 LL | const fn foo30(x: *const u32) -> usize { x as usize }
137    |                                          ^^^^^^^^^^
138    |
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
141
142 error[E0723]: casting pointers to ints is unstable in const fn
143   --> $DIR/min_const_fn.rs:94:63
144    |
145 LL | const fn foo30_with_unsafe(x: *const u32) -> usize { unsafe { x as usize } }
146    |                                                               ^^^^^^^^^^
147    |
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
150
151 error[E0723]: casting pointers to ints is unstable in const fn
152   --> $DIR/min_const_fn.rs:96:42
153    |
154 LL | const fn foo30_2(x: *mut u32) -> usize { x as usize }
155    |                                          ^^^^^^^^^^
156    |
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
159
160 error[E0723]: casting pointers to ints is unstable in const fn
161   --> $DIR/min_const_fn.rs:98:63
162    |
163 LL | const fn foo30_2_with_unsafe(x: *mut u32) -> usize { unsafe { x as usize } }
164    |                                                               ^^^^^^^^^^
165    |
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
168
169 error[E0723]: mutable references in const fn are unstable
170   --> $DIR/min_const_fn.rs:101:14
171    |
172 LL | const fn inc(x: &mut i32) { *x += 1 }
173    |              ^
174    |
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
177
178 error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable
179   --> $DIR/min_const_fn.rs:110:6
180    |
181 LL | impl<T: std::fmt::Debug> Foo<T> {
182    |      ^
183    |
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
186
187 error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable
188   --> $DIR/min_const_fn.rs:115:6
189    |
190 LL | impl<T: std::fmt::Debug + Sized> Foo<T> {
191    |      ^
192    |
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
195
196 error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable
197   --> $DIR/min_const_fn.rs:120:6
198    |
199 LL | impl<T: Sync + Sized> Foo<T> {
200    |      ^
201    |
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
204
205 error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable
206   --> $DIR/min_const_fn.rs:126:34
207    |
208 LL | const fn no_apit2(_x: AlanTuring<impl std::fmt::Debug>) {}
209    |                                  ^^^^^^^^^^^^^^^^^^^^
210    |
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
213
214 error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable
215   --> $DIR/min_const_fn.rs:128:22
216    |
217 LL | const fn no_apit(_x: impl std::fmt::Debug) {}
218    |                      ^^^^^^^^^^^^^^^^^^^^
219    |
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
222
223 error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable
224   --> $DIR/min_const_fn.rs:129:23
225    |
226 LL | const fn no_dyn_trait(_x: &dyn std::fmt::Debug) {}
227    |                       ^^
228    |
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
231
232 error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable
233   --> $DIR/min_const_fn.rs:130:32
234    |
235 LL | const fn no_dyn_trait_ret() -> &'static dyn std::fmt::Debug { &() }
236    |                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
237    |
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
240
241 error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable
242   --> $DIR/min_const_fn.rs:135:41
243    |
244 LL | const fn really_no_traits_i_mean_it() { (&() as &dyn std::fmt::Debug, ()).1 }
245    |                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
246    |
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
249
250 error[E0723]: function pointers in const fn are unstable
251   --> $DIR/min_const_fn.rs:138:21
252    |
253 LL | const fn no_fn_ptrs(_x: fn()) {}
254    |                     ^^
255    |
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
258
259 error[E0723]: function pointers in const fn are unstable
260   --> $DIR/min_const_fn.rs:140:27
261    |
262 LL | const fn no_fn_ptrs2() -> fn() { fn foo() {} foo }
263    |                           ^^^^
264    |
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
267
268 error: aborting due to 30 previous errors
269
270 Some errors have detailed explanations: E0493, E0723.
271 For more information about an error, try `rustc --explain E0493`.