File tree Expand file tree Collapse file tree 3 files changed +18
-10
lines changed
Expand file tree Collapse file tree 3 files changed +18
-10
lines changed Original file line number Diff line number Diff line change @@ -579,9 +579,21 @@ private class BlockExprItemNode extends ItemNode instanceof BlockExpr {
579579}
580580
581581private class TypeParamItemNode extends ItemNode instanceof TypeParam {
582+ private WherePred getAWherePred ( ) {
583+ exists ( ItemNode declaringItem |
584+ this = resolveTypeParamPathTypeRepr ( result .getTypeRepr ( ) ) and
585+ result = declaringItem .getADescendant ( ) and
586+ this = declaringItem .getADescendant ( )
587+ )
588+ }
589+
582590 pragma [ nomagic]
583591 Path getABoundPath ( ) {
584- result = super .getTypeBoundList ( ) .getABound ( ) .getTypeRepr ( ) .( PathTypeRepr ) .getPath ( )
592+ exists ( TypeBoundList tbl | result = tbl .getABound ( ) .getTypeRepr ( ) .( PathTypeRepr ) .getPath ( ) |
593+ tbl = super .getTypeBoundList ( )
594+ or
595+ tbl = this .getAWherePred ( ) .getTypeBoundList ( )
596+ )
585597 }
586598
587599 pragma [ nomagic]
@@ -602,11 +614,7 @@ private class TypeParamItemNode extends ItemNode instanceof TypeParam {
602614 predicate hasTraitBound ( ) {
603615 exists ( this .getABoundPath ( ) )
604616 or
605- exists ( ItemNode declaringItem , WherePred wp |
606- this = resolveTypeParamPathTypeRepr ( wp .getTypeRepr ( ) ) and
607- wp = declaringItem .getADescendant ( ) and
608- this = declaringItem .getADescendant ( )
609- )
617+ exists ( this .getAWherePred ( ) )
610618 }
611619
612620 /**
Original file line number Diff line number Diff line change @@ -568,7 +568,7 @@ mod m24 {
568568 T : TraitA // $ item=I111 item=I1151
569569 {
570570 fn call_trait_a ( & self ) {
571- self . data . trait_a_method ( ) ; // $ MISSING: item=I110
571+ self . data . trait_a_method ( ) ; // $ item=I110
572572 } // I116
573573 }
574574
@@ -580,8 +580,8 @@ mod m24 {
580580 T : TraitA , // $ item=I111 item=I1161
581581 {
582582 fn call_both ( & self ) {
583- self . data . trait_a_method ( ) ; // $ MISSING: item=I110
584- self . data . trait_b_method ( ) ; // $ MISSING: item=I112
583+ self . data . trait_a_method ( ) ; // $ item=I110
584+ self . data . trait_b_method ( ) ; // $ item=I112
585585 } // I117
586586 }
587587
Original file line number Diff line number Diff line change @@ -623,7 +623,7 @@ mod function_trait_bounds_2 {
623623 where
624624 T1 : Into < T2 > ,
625625 {
626- x. into ( )
626+ x. into ( ) // $ method=into
627627 }
628628
629629 pub fn f ( ) {
You can’t perform that action at this time.
0 commit comments