@@ -360,7 +360,7 @@ class CrateItemNode extends ItemNode instanceof Crate {
360
360
361
361
override predicate providesCanonicalPathPrefixFor ( Crate c , ItemNode child ) {
362
362
this .hasCanonicalPath ( c ) and
363
- exists ( ModuleLikeNode m | m = this .getModuleNode ( ) |
363
+ exists ( ModuleLikeNode m | m = [ this .getModuleNode ( ) , super . getModule ( ) . ( ModuleLikeNode ) ] |
364
364
child = m
365
365
or
366
366
child .getImmediateParent ( ) = m .( SourceFile ) and
@@ -648,6 +648,16 @@ private class MacroCallItemNode extends AssocItemNode instanceof MacroCall {
648
648
649
649
override Visibility getVisibility ( ) { none ( ) }
650
650
651
+ override predicate providesCanonicalPathPrefixFor ( Crate c , ItemNode child ) {
652
+ any ( ItemNode parent ) .providesCanonicalPathPrefixFor ( c , this ) and
653
+ child .getImmediateParent ( ) = this
654
+ }
655
+
656
+ override string getCanonicalPathPrefixFor ( Crate c , ItemNode child ) {
657
+ result = this .getCanonicalPathPrefix ( c ) and
658
+ this .providesCanonicalPathPrefixFor ( c , child )
659
+ }
660
+
651
661
override predicate hasCanonicalPath ( Crate c ) { none ( ) }
652
662
653
663
override string getCanonicalPath ( Crate c ) { none ( ) }
@@ -1413,8 +1423,8 @@ private module Debug {
1413
1423
private Locatable getRelevantLocatable ( ) {
1414
1424
exists ( string filepath , int startline , int startcolumn , int endline , int endcolumn |
1415
1425
result .getLocation ( ) .hasLocationInfo ( filepath , startline , startcolumn , endline , endcolumn ) and
1416
- filepath .matches ( "%/test_logging .rs" ) and
1417
- startline = 163
1426
+ filepath .matches ( "%/clean/types .rs" ) and
1427
+ startline = [ 5 , 350 ]
1418
1428
)
1419
1429
}
1420
1430
@@ -1450,4 +1460,14 @@ private module Debug {
1450
1460
m = getRelevantLocatable ( ) and
1451
1461
fileImport ( m , f )
1452
1462
}
1463
+
1464
+ predicate debugPreludeEdge ( SourceFile f , string name , ItemNode i ) {
1465
+ preludeEdge ( f , name , i ) and
1466
+ f = getRelevantLocatable ( )
1467
+ }
1468
+
1469
+ string debugGetCanonicalPath ( ItemNode i , Crate c ) {
1470
+ result = i .getCanonicalPath ( c ) and
1471
+ i = getRelevantLocatable ( )
1472
+ }
1453
1473
}
0 commit comments