1
Fork 0

tcx.is_const_fn doesn't work the way it is described, remove it

Then we can rename the _raw functions to drop their suffix, and instead
explicitly use is_stable_const_fn for the few cases where that is really what
you want.
This commit is contained in:
Ralf Jung 2024-10-12 20:37:35 +02:00
parent 36dda4571d
commit 8849ac6042
21 changed files with 55 additions and 64 deletions

View file

@ -673,7 +673,7 @@ impl<'tcx> Validator<'_, 'tcx> {
}
// Make sure the callee is a `const fn`.
let is_const_fn = match *fn_ty.kind() {
ty::FnDef(def_id, _) => self.tcx.is_const_fn_raw(def_id),
ty::FnDef(def_id, _) => self.tcx.is_const_fn(def_id),
_ => false,
};
if !is_const_fn {