// the type. The last generator (`outer_generator` below) has information about where the
// bound was introduced. At least one generator should be present for this diagnostic to be
// modified.
- let (mut trait_ref, mut target_ty) = match obligation.predicate.kind() {
- ty::PredicateKind::Trait(p, _) => {
- (Some(p.skip_binder().trait_ref), Some(p.skip_binder().self_ty()))
- }
+ let (mut trait_ref, mut target_ty) = match obligation.predicate.skip_binders() {
+ ty::PredicateAtom::Trait(p, _) => (Some(p.trait_ref), Some(p.self_ty())),
_ => (None, None),
};
let mut generator = None;