Rename impl_constness to constness

The current code is a basis for `is_const_fn_raw`, and `impl_constness`
is no longer a valid name, which is previously used for determining the
constness of impls, and not items in general.
This commit is contained in:
Deadbeef
2022-06-15 20:54:43 +10:00
parent 389352c4bb
commit 26ac45614b
10 changed files with 26 additions and 26 deletions

View File

@@ -2309,7 +2309,7 @@ impl<'tcx> TyCtxt<'tcx> {
#[inline]
pub fn is_const_fn_raw(self, def_id: DefId) -> bool {
matches!(self.def_kind(def_id), DefKind::Fn | DefKind::AssocFn | DefKind::Ctor(..))
&& self.impl_constness(def_id) == hir::Constness::Const
&& self.constness(def_id) == hir::Constness::Const
}
#[inline]