File tree 3 files changed +18
-10
lines changed
3 files changed +18
-10
lines changed Original file line number Diff line number Diff line change @@ -581,9 +581,21 @@ private class BlockExprItemNode extends ItemNode instanceof BlockExpr {
581
581
}
582
582
583
583
class TypeParamItemNode extends ItemNode instanceof TypeParam {
584
+ private WherePred getAWherePred ( ) {
585
+ exists ( ItemNode declaringItem |
586
+ this = resolveTypeParamPathTypeRepr ( result .getTypeRepr ( ) ) and
587
+ result = declaringItem .getADescendant ( ) and
588
+ this = declaringItem .getADescendant ( )
589
+ )
590
+ }
591
+
584
592
pragma [ nomagic]
585
593
Path getABoundPath ( ) {
586
- result = super .getTypeBoundList ( ) .getABound ( ) .getTypeRepr ( ) .( PathTypeRepr ) .getPath ( )
594
+ exists ( TypeBoundList tbl | result = tbl .getABound ( ) .getTypeRepr ( ) .( PathTypeRepr ) .getPath ( ) |
595
+ tbl = super .getTypeBoundList ( )
596
+ or
597
+ tbl = this .getAWherePred ( ) .getTypeBoundList ( )
598
+ )
587
599
}
588
600
589
601
pragma [ nomagic]
@@ -605,11 +617,7 @@ class TypeParamItemNode extends ItemNode instanceof TypeParam {
605
617
Stages:: PathResolutionStage:: ref ( ) and
606
618
exists ( this .getABoundPath ( ) )
607
619
or
608
- exists ( ItemNode declaringItem , WherePred wp |
609
- this = resolveTypeParamPathTypeRepr ( wp .getTypeRepr ( ) ) and
610
- wp = declaringItem .getADescendant ( ) and
611
- this = declaringItem .getADescendant ( )
612
- )
620
+ exists ( this .getAWherePred ( ) )
613
621
}
614
622
615
623
/**
Original file line number Diff line number Diff line change @@ -568,7 +568,7 @@ mod m24 {
568
568
T : TraitA // $ item=I111 item=I1151
569
569
{
570
570
fn call_trait_a ( & self ) {
571
- self . data . trait_a_method ( ) ; // $ MISSING: item=I110
571
+ self . data . trait_a_method ( ) ; // $ item=I110
572
572
} // I116
573
573
}
574
574
@@ -580,8 +580,8 @@ mod m24 {
580
580
T : TraitA , // $ item=I111 item=I1161
581
581
{
582
582
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
585
585
} // I117
586
586
}
587
587
Original file line number Diff line number Diff line change @@ -623,7 +623,7 @@ mod function_trait_bounds_2 {
623
623
where
624
624
T1 : Into < T2 > ,
625
625
{
626
- x. into ( )
626
+ x. into ( ) // $ method=into
627
627
}
628
628
629
629
pub fn f ( ) {
You can’t perform that action at this time.
0 commit comments