@@ -76,60 +76,24 @@ LL | const fn foo11_2<T: Send>(t: T) -> T { t }
7676 = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
7777 = help: add `#![feature(const_fn)]` to the crate attributes to enable
7878
79- error[E0658]: floating point arithmetic is not allowed in constant functions
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_floating_point_arithmetic)]` to the crate attributes to enable
87-
88- error[E0658]: floating point arithmetic is not allowed in constant functions
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_floating_point_arithmetic)]` to the crate attributes to enable
96-
97- error[E0658]: floating point arithmetic is not allowed in constant functions
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_floating_point_arithmetic)]` to the crate attributes to enable
105-
106- error[E0658]: floating point arithmetic is not allowed in constant functions
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_floating_point_arithmetic)]` to the crate attributes to enable
114-
11579error[E0013]: constant functions cannot refer to statics
116- --> $DIR/min_const_fn.rs:90 :27
80+ --> $DIR/min_const_fn.rs:82 :27
11781 |
11882LL | const fn foo25() -> u32 { BAR }
11983 | ^^^
12084 |
12185 = help: consider extracting the value of the `static` to a `const`, and referring to that
12286
12387error[E0013]: constant functions cannot refer to statics
124- --> $DIR/min_const_fn.rs:91 :37
88+ --> $DIR/min_const_fn.rs:83 :37
12589 |
12690LL | const fn foo26() -> &'static u32 { &BAR }
12791 | ^^^
12892 |
12993 = help: consider extracting the value of the `static` to a `const`, and referring to that
13094
13195error[E0658]: casting pointers to integers in constant functions is unstable
132- --> $DIR/min_const_fn.rs:92 :42
96+ --> $DIR/min_const_fn.rs:84 :42
13397 |
13498LL | const fn foo30(x: *const u32) -> usize { x as usize }
13599 | ^^^^^^^^^^
@@ -138,7 +102,7 @@ LL | const fn foo30(x: *const u32) -> usize { x as usize }
138102 = help: add `#![feature(const_raw_ptr_to_usize_cast)]` to the crate attributes to enable
139103
140104error[E0658]: casting pointers to integers in constant functions is unstable
141- --> $DIR/min_const_fn.rs:94 :63
105+ --> $DIR/min_const_fn.rs:86 :63
142106 |
143107LL | const fn foo30_with_unsafe(x: *const u32) -> usize { unsafe { x as usize } }
144108 | ^^^^^^^^^^
@@ -147,7 +111,7 @@ LL | const fn foo30_with_unsafe(x: *const u32) -> usize { unsafe { x as usize }
147111 = help: add `#![feature(const_raw_ptr_to_usize_cast)]` to the crate attributes to enable
148112
149113error[E0658]: casting pointers to integers in constant functions is unstable
150- --> $DIR/min_const_fn.rs:96 :42
114+ --> $DIR/min_const_fn.rs:88 :42
151115 |
152116LL | const fn foo30_2(x: *mut u32) -> usize { x as usize }
153117 | ^^^^^^^^^^
@@ -156,7 +120,7 @@ LL | const fn foo30_2(x: *mut u32) -> usize { x as usize }
156120 = help: add `#![feature(const_raw_ptr_to_usize_cast)]` to the crate attributes to enable
157121
158122error[E0658]: casting pointers to integers in constant functions is unstable
159- --> $DIR/min_const_fn.rs:98 :63
123+ --> $DIR/min_const_fn.rs:90 :63
160124 |
161125LL | const fn foo30_2_with_unsafe(x: *mut u32) -> usize { unsafe { x as usize } }
162126 | ^^^^^^^^^^
@@ -165,7 +129,7 @@ LL | const fn foo30_2_with_unsafe(x: *mut u32) -> usize { unsafe { x as usize }
165129 = help: add `#![feature(const_raw_ptr_to_usize_cast)]` to the crate attributes to enable
166130
167131error[E0658]: mutable references are not allowed in constant functions
168- --> $DIR/min_const_fn.rs:101 :14
132+ --> $DIR/min_const_fn.rs:93 :14
169133 |
170134LL | const fn inc(x: &mut i32) { *x += 1 }
171135 | ^
@@ -174,7 +138,7 @@ LL | const fn inc(x: &mut i32) { *x += 1 }
174138 = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
175139
176140error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable
177- --> $DIR/min_const_fn.rs:110 :6
141+ --> $DIR/min_const_fn.rs:102 :6
178142 |
179143LL | impl<T: std::fmt::Debug> Foo<T> {
180144 | ^
@@ -183,7 +147,7 @@ LL | impl<T: std::fmt::Debug> Foo<T> {
183147 = help: add `#![feature(const_fn)]` to the crate attributes to enable
184148
185149error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable
186- --> $DIR/min_const_fn.rs:115 :6
150+ --> $DIR/min_const_fn.rs:107 :6
187151 |
188152LL | impl<T: std::fmt::Debug + Sized> Foo<T> {
189153 | ^
@@ -192,7 +156,7 @@ LL | impl<T: std::fmt::Debug + Sized> Foo<T> {
192156 = help: add `#![feature(const_fn)]` to the crate attributes to enable
193157
194158error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable
195- --> $DIR/min_const_fn.rs:120 :6
159+ --> $DIR/min_const_fn.rs:112 :6
196160 |
197161LL | impl<T: Sync + Sized> Foo<T> {
198162 | ^
@@ -201,7 +165,7 @@ LL | impl<T: Sync + Sized> Foo<T> {
201165 = help: add `#![feature(const_fn)]` to the crate attributes to enable
202166
203167error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable
204- --> $DIR/min_const_fn.rs:126 :34
168+ --> $DIR/min_const_fn.rs:118 :34
205169 |
206170LL | const fn no_apit2(_x: AlanTuring<impl std::fmt::Debug>) {}
207171 | ^^^^^^^^^^^^^^^^^^^^
@@ -210,7 +174,7 @@ LL | const fn no_apit2(_x: AlanTuring<impl std::fmt::Debug>) {}
210174 = help: add `#![feature(const_fn)]` to the crate attributes to enable
211175
212176error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable
213- --> $DIR/min_const_fn.rs:128 :22
177+ --> $DIR/min_const_fn.rs:120 :22
214178 |
215179LL | const fn no_apit(_x: impl std::fmt::Debug) {}
216180 | ^^^^^^^^^^^^^^^^^^^^
@@ -219,7 +183,7 @@ LL | const fn no_apit(_x: impl std::fmt::Debug) {}
219183 = help: add `#![feature(const_fn)]` to the crate attributes to enable
220184
221185error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable
222- --> $DIR/min_const_fn.rs:129 :23
186+ --> $DIR/min_const_fn.rs:121 :23
223187 |
224188LL | const fn no_dyn_trait(_x: &dyn std::fmt::Debug) {}
225189 | ^^
@@ -228,7 +192,7 @@ LL | const fn no_dyn_trait(_x: &dyn std::fmt::Debug) {}
228192 = help: add `#![feature(const_fn)]` to the crate attributes to enable
229193
230194error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable
231- --> $DIR/min_const_fn.rs:130 :32
195+ --> $DIR/min_const_fn.rs:122 :32
232196 |
233197LL | const fn no_dyn_trait_ret() -> &'static dyn std::fmt::Debug { &() }
234198 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -237,7 +201,7 @@ LL | const fn no_dyn_trait_ret() -> &'static dyn std::fmt::Debug { &() }
237201 = help: add `#![feature(const_fn)]` to the crate attributes to enable
238202
239203error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable
240- --> $DIR/min_const_fn.rs:135 :41
204+ --> $DIR/min_const_fn.rs:127 :41
241205 |
242206LL | const fn really_no_traits_i_mean_it() { (&() as &dyn std::fmt::Debug, ()).1 }
243207 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -246,7 +210,7 @@ LL | const fn really_no_traits_i_mean_it() { (&() as &dyn std::fmt::Debug, ()).1
246210 = help: add `#![feature(const_fn)]` to the crate attributes to enable
247211
248212error[E0723]: function pointers in const fn are unstable
249- --> $DIR/min_const_fn.rs:138 :21
213+ --> $DIR/min_const_fn.rs:130 :21
250214 |
251215LL | const fn no_fn_ptrs(_x: fn()) {}
252216 | ^^
@@ -255,15 +219,15 @@ LL | const fn no_fn_ptrs(_x: fn()) {}
255219 = help: add `#![feature(const_fn)]` to the crate attributes to enable
256220
257221error[E0723]: function pointers in const fn are unstable
258- --> $DIR/min_const_fn.rs:140 :27
222+ --> $DIR/min_const_fn.rs:132 :27
259223 |
260224LL | const fn no_fn_ptrs2() -> fn() { fn foo() {} foo }
261225 | ^^^^
262226 |
263227 = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
264228 = help: add `#![feature(const_fn)]` to the crate attributes to enable
265229
266- error: aborting due to 30 previous errors
230+ error: aborting due to 26 previous errors
267231
268232Some errors have detailed explanations: E0013, E0493, E0658, E0723.
269233For more information about an error, try `rustc --explain E0013`.
0 commit comments