Introduce PredicateKind::Clause

This commit is contained in:
Santiago Pastorino
2022-11-24 18:14:58 -03:00
parent 42cc8e8f4e
commit 974e2837bb
75 changed files with 568 additions and 407 deletions

View File

@@ -258,8 +258,9 @@ impl<'tcx> LateLintPass<'tcx> for UnusedResults {
)
.filter_map(|obligation| {
// We only look at the `DefId`, so it is safe to skip the binder here.
if let ty::PredicateKind::Trait(ref poly_trait_predicate) =
obligation.predicate.kind().skip_binder()
if let ty::PredicateKind::Clause(ty::Clause::Trait(
ref poly_trait_predicate,
)) = obligation.predicate.kind().skip_binder()
{
let def_id = poly_trait_predicate.trait_ref.def_id;