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:
parent
389352c4bb
commit
26ac45614b
10 changed files with 26 additions and 26 deletions
|
@ -970,7 +970,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
|
|||
|
||||
if let Some(impl_def_id) = relevant_impl {
|
||||
// Check that `impl Drop` is actually const, if there is a custom impl
|
||||
if self.tcx().impl_constness(impl_def_id) == hir::Constness::Const {
|
||||
if self.tcx().constness(impl_def_id) == hir::Constness::Const {
|
||||
candidates.vec.push(ConstDestructCandidate(Some(impl_def_id)));
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -1119,8 +1119,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
|
|||
if obligation.is_const() {
|
||||
match candidate {
|
||||
// const impl
|
||||
ImplCandidate(def_id)
|
||||
if tcx.impl_constness(def_id) == hir::Constness::Const => {}
|
||||
ImplCandidate(def_id) if tcx.constness(def_id) == hir::Constness::Const => {}
|
||||
// const param
|
||||
ParamCandidate(trait_pred) if trait_pred.is_const_if_const() => {}
|
||||
// auto trait impl
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue