mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-24 07:44:10 +00:00
ignore constness when checking dtor predicates
This commit is contained in:
parent
ee5d8d37ba
commit
f9eb0b3b7b
@ -228,9 +228,15 @@ fn ensure_drop_predicates_are_implied_by_item_defn<'tcx>(
|
||||
let predicate = predicate.kind();
|
||||
let p = p.kind();
|
||||
match (predicate.skip_binder(), p.skip_binder()) {
|
||||
(ty::PredicateKind::Trait(a), ty::PredicateKind::Trait(b)) => {
|
||||
relator.relate(predicate.rebind(a), p.rebind(b)).is_ok()
|
||||
}
|
||||
(ty::PredicateKind::Trait(a), ty::PredicateKind::Trait(b)) => relator
|
||||
.relate(
|
||||
predicate.rebind(ty::TraitPredicate {
|
||||
constness: ty::BoundConstness::NotConst,
|
||||
..a
|
||||
}),
|
||||
p.rebind(b),
|
||||
)
|
||||
.is_ok(),
|
||||
(ty::PredicateKind::Projection(a), ty::PredicateKind::Projection(b)) => {
|
||||
relator.relate(predicate.rebind(a), p.rebind(b)).is_ok()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user