diff options
| author | Ralf Jung <post@ralfj.de> | 2024-10-12 20:37:35 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2024-10-25 20:52:39 +0200 |
| commit | 8849ac6042770500db91aca860ec8d86af2c74a3 (patch) | |
| tree | 71e46c27b69586ca57b35052526aa8751b31fadf /compiler/rustc_mir_transform/src | |
| parent | 36dda4571dc3b98ac9759b8af67887e170a426d7 (diff) | |
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.
Diffstat (limited to 'compiler/rustc_mir_transform/src')
| -rw-r--r-- | compiler/rustc_mir_transform/src/promote_consts.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_mir_transform/src/promote_consts.rs b/compiler/rustc_mir_transform/src/promote_consts.rs index 86c4b241a2b..fa9a6bfcf7c 100644 --- a/compiler/rustc_mir_transform/src/promote_consts.rs +++ b/compiler/rustc_mir_transform/src/promote_consts.rs @@ -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 { |
