Skip to content

Commit 1082d7a

Browse files
Add a feature gate for basic function pointer use in const fn
1 parent 7b59d01 commit 1082d7a

File tree

4 files changed

+4
-0
lines changed

4 files changed

+4
-0
lines changed

core/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@
8383
#![feature(const_fn_union)]
8484
#![feature(const_fn)]
8585
#![cfg_attr(not(bootstrap), feature(const_fn_floating_point_arithmetic))]
86+
#![cfg_attr(not(bootstrap), feature(const_fn_fn_ptr_basics))]
8687
#![feature(const_generics)]
8788
#![feature(const_option)]
8889
#![feature(const_precise_live_drops)]

core/src/task/wake.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ impl RawWakerVTable {
136136
// (see https://github.com/rust-rfcs/const-eval/issues/19#issuecomment-472799062)
137137
#[rustc_allow_const_fn_ptr]
138138
#[rustc_const_stable(feature = "futures_api", since = "1.36.0")]
139+
#[cfg_attr(not(bootstrap), allow_internal_unstable(const_fn_fn_ptr_basics))]
139140
pub const fn new(
140141
clone: unsafe fn(*const ()) -> RawWaker,
141142
wake: unsafe fn(*const ()),

proc_macro/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#![feature(nll)]
2222
#![feature(staged_api)]
2323
#![feature(const_fn)]
24+
#![cfg_attr(not(bootstrap), feature(const_fn_fn_ptr_basics))]
2425
#![feature(allow_internal_unstable)]
2526
#![feature(decl_macro)]
2627
#![feature(extern_types)]

std/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@
239239
#![cfg_attr(not(bootstrap), feature(const_fn_floating_point_arithmetic))]
240240
#![feature(const_fn_transmute)]
241241
#![feature(const_fn)]
242+
#![cfg_attr(not(bootstrap), feature(const_fn_fn_ptr_basics))]
242243
#![feature(const_ip)]
243244
#![feature(const_ipv6)]
244245
#![feature(const_raw_ptr_deref)]

0 commit comments

Comments
 (0)