Skip to content

Commit fa46715

Browse files
committedAug 5, 2021
remove tywf relation
1 parent b1d14ef commit fa46715

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed
 

‎compiler/rustc_typeck/src/check/dropck.rs

+3-7
Original file line numberDiff line numberDiff line change
@@ -217,9 +217,9 @@ fn ensure_drop_predicates_are_implied_by_item_defn<'tcx>(
217217
// repeated `.iter().any(..)` calls.
218218

219219
// This closure is a more robust way to check `Predicate` equality
220-
// than simple `==` checks (which were the previous implementation). It relies on
221-
// `ty::relate` for `TraitPredicate`, `ProjectionPredicate`, `ConstEvaluatable`
222-
// `TypeOutlives` and `TypeWellFormedFromEnv` (which implement the Relate trait),
220+
// than simple `==` checks (which were the previous implementation).
221+
// It relies on `ty::relate` for `TraitPredicate`, `ProjectionPredicate`,
222+
// `ConstEvaluatable` and `TypeOutlives` (which implement the Relate trait),
223223
// while delegating on simple equality for the other `Predicate`.
224224
// This implementation solves (Issue #59497) and (Issue #58311).
225225
// It is unclear to me at the moment whether the approach based on `relate`
@@ -242,10 +242,6 @@ fn ensure_drop_predicates_are_implied_by_item_defn<'tcx>(
242242
(ty::PredicateKind::TypeOutlives(a), ty::PredicateKind::TypeOutlives(b)) => {
243243
relator.relate(predicate.rebind(a.0), p.rebind(b.0)).is_ok()
244244
}
245-
(
246-
ty::PredicateKind::TypeWellFormedFromEnv(a),
247-
ty::PredicateKind::TypeWellFormedFromEnv(b),
248-
) => relator.relate(predicate.rebind(a), p.rebind(b)).is_ok(),
249245
_ => predicate == p,
250246
}
251247
};

0 commit comments

Comments
 (0)