@@ -669,12 +669,17 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, 'tcx> {
669
669
// ```
670
670
let mut predicates: Vec < Span > = traits:: elaborate (
671
671
tcx,
672
- tcx. predicates_of ( def_id) . predicates . iter ( ) . map ( |( p, sp) | ( p. as_predicate ( ) , * sp) ) ,
672
+ tcx. predicates_of ( def_id)
673
+ . predicates
674
+ . iter ( )
675
+ . map ( |( p, sp) | ( p. as_predicate ( ) , * sp) )
676
+ . chain (
677
+ tcx. predicates_of ( parent)
678
+ . predicates
679
+ . iter ( )
680
+ . map ( |( p, sp) | ( p. as_predicate ( ) , * sp) ) ,
681
+ ) ,
673
682
)
674
- . chain ( traits:: elaborate (
675
- tcx,
676
- tcx. predicates_of ( parent) . predicates . iter ( ) . map ( |( p, sp) | ( p. as_predicate ( ) , * sp) ) ,
677
- ) )
678
683
. filter_map ( |( pred, pred_span) | {
679
684
if let ty:: PredicateKind :: Clause ( clause) = pred. kind ( ) . skip_binder ( )
680
685
&& let ty:: ClauseKind :: TypeOutlives ( ty:: OutlivesPredicate ( pred_ty, r) ) = clause
@@ -684,7 +689,7 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, 'tcx> {
684
689
&& ( self . infcx . can_eq ( self . param_env , ty, pred_ty)
685
690
|| matches ! (
686
691
pred_ty. kind( ) ,
687
- ty:: Param ( name) if name. name. as_str ( ) == "Self" ) )
692
+ ty:: Param ( name) if name. name == kw :: SelfUpper ) )
688
693
{
689
694
Some ( pred_span)
690
695
} else {
0 commit comments