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:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user