Function rustc_const_eval::source ·
transform:: check_consts:: is_const_stable_const_fn
pub fn is_const_stable_const_fn(tcx: TyCtxt<'_>, def_id: DefId) -> bool
true if the given
const fn is “const-stable”.
Panics if the given
DefId does not refer to a
Const-stability is only relevant for
const fn within a
staged_api crate. Only “const-stable”
functions can be called in a const-context by users of the stable compiler. “const-stable”
functions are subject to more stringent restrictions than “const-unstable” functions: They
cannot use unstable features and can only call other “const-stable” functions.