Skip to content

Commit 25376f5

Browse files
committed
Auto merge of rust-lang#84310 - RalfJung:const-fn-feature-flags, r=oli-obk
further split up const_fn feature flag This continues the work on splitting up `const_fn` into separate feature flags: * `const_fn_trait_bound` for `const fn` with trait bounds * `const_fn_unsize` for unsizing coercions in `const fn` (looks like only `dyn` unsizing is still guarded here) I don't know if there are even any things left that `const_fn` guards... at least libcore and liballoc do not need it any more. `@oli-obk` are you currently able to do reviews?
2 parents fbe0298 + 3258c9c commit 25376f5

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

alloc/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@
8989
#![feature(cfg_target_has_atomic)]
9090
#![feature(coerce_unsized)]
9191
#![feature(const_btree_new)]
92-
#![feature(const_fn)]
92+
#![cfg_attr(bootstrap, feature(const_fn))]
93+
#![cfg_attr(not(bootstrap), feature(const_fn_trait_bound))]
9394
#![feature(cow_is_borrowed)]
9495
#![feature(const_cow_is_borrowed)]
9596
#![feature(destructuring_assignment)]

core/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,12 @@
8181
#![feature(const_refs_to_cell)]
8282
#![feature(const_panic)]
8383
#![feature(const_pin)]
84-
#![feature(const_fn)]
84+
#![cfg_attr(bootstrap, feature(const_fn))]
8585
#![feature(const_fn_union)]
8686
#![feature(const_impl_trait)]
8787
#![feature(const_fn_floating_point_arithmetic)]
8888
#![feature(const_fn_fn_ptr_basics)]
89+
#![cfg_attr(not(bootstrap), feature(const_fn_trait_bound))]
8990
#![feature(const_option)]
9091
#![feature(const_precise_live_drops)]
9192
#![feature(const_ptr_offset)]

0 commit comments

Comments
 (0)