mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
![]() Remove `#[rustc_allow_const_fn_ptr]` and add `#![feature(const_fn_fn_ptr_basics)]` `rustc_allow_const_fn_ptr` was a hack to work around the lack of an escape hatch for the "min `const fn`" checks in const-stable functions. Now that we have co-opted `allow_internal_unstable` for this purpose, we no longer need a bespoke attribute. Now this functionality is gated under `const_fn_fn_ptr_basics` (how concise!), and `#[allow_internal_unstable(const_fn_fn_ptr_basics)]` replaces `#[rustc_allow_const_fn_ptr]`. `const_fn_fn_ptr_basics` allows function pointer types to appear in the arguments and locals of a `const fn` as well as function pointer casts to be performed inside a `const fn`. Both of these were allowed in constants and statics already. Notably, this does **not** allow users to invoke function pointers in a const context. Presumably, we will use a nicer name for that (`const_fn_ptr`?). r? @oli-obk |
||
---|---|---|
.. | ||
check_consts | ||
add_call_guards.rs | ||
add_moves_for_packed_drops.rs | ||
add_retag.rs | ||
check_const_item_mutation.rs | ||
check_packed_ref.rs | ||
check_unsafety.rs | ||
cleanup_post_borrowck.rs | ||
const_prop.rs | ||
copy_prop.rs | ||
deaggregator.rs | ||
dest_prop.rs | ||
dump_mir.rs | ||
early_otherwise_branch.rs | ||
elaborate_drops.rs | ||
generator.rs | ||
inline.rs | ||
instcombine.rs | ||
instrument_coverage.rs | ||
match_branches.rs | ||
mod.rs | ||
no_landing_pads.rs | ||
nrvo.rs | ||
promote_consts.rs | ||
remove_noop_landing_pads.rs | ||
remove_unneeded_drops.rs | ||
required_consts.rs | ||
rustc_peek.rs | ||
simplify_branches.rs | ||
simplify_comparison_integral.rs | ||
simplify_try.rs | ||
simplify.rs | ||
uninhabited_enum_branching.rs | ||
unreachable_prop.rs | ||
validate.rs |