Skip to content

Commit f647079

Browse files
authored
Rollup merge of rust-lang#128596 - RalfJung:const_fn_floating_point_arithmetic, r=nnethercote
stabilize const_fn_floating_point_arithmetic Part of rust-lang#128288 Fixes rust-lang#57241 The existing test `tests/ui/consts/const_let_eq_float.rs` ([link](https://github.com/RalfJung/rust/blob/const_fn_floating_point_arithmetic/tests/ui/consts/const_let_eq_float.rs)) covers the basics, and also Miri has extensive tests covering the interpreter's float machinery. Also, that machinery can already be used on stable inside `const`/`static` initializers, just not inside `const fn`. This was explicitly called out in rust-lang/rfcs#3514 so in a sense t-lang just recently already FCP'd this, but let's hear from them whether they want another FCP for the stabilization here or whether that was covered by the FCP for the RFC. Cc ``@rust-lang/lang`` ### Open items - [x] Update the Reference: rust-lang/reference#1566
2 parents 0803686 + 7496478 commit f647079

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: core/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@
193193
// Language features:
194194
// tidy-alphabetical-start
195195
#![cfg_attr(bootstrap, feature(asm_const))]
196+
#![cfg_attr(bootstrap, feature(const_fn_floating_point_arithmetic))]
196197
#![cfg_attr(bootstrap, feature(min_exhaustive_patterns))]
197198
#![feature(abi_unadjusted)]
198199
#![feature(adt_const_params)]
@@ -202,7 +203,6 @@
202203
#![feature(cfg_sanitize)]
203204
#![feature(cfg_target_has_atomic)]
204205
#![feature(cfg_target_has_atomic_equal_alignment)]
205-
#![feature(const_fn_floating_point_arithmetic)]
206206
#![feature(const_for)]
207207
#![feature(const_mut_refs)]
208208
#![feature(const_precise_live_drops)]

0 commit comments

Comments
 (0)