@@ -360,7 +360,7 @@ class CrateItemNode extends ItemNode instanceof Crate {
360360
361361 override predicate providesCanonicalPathPrefixFor ( Crate c , ItemNode child ) {
362362 this .hasCanonicalPath ( c ) and
363- exists ( ModuleLikeNode m | m = this .getModuleNode ( ) |
363+ exists ( ModuleLikeNode m | m = [ this .getModuleNode ( ) , super . getModule ( ) . ( ModuleLikeNode ) ] |
364364 child = m
365365 or
366366 child .getImmediateParent ( ) = m .( SourceFile ) and
@@ -648,6 +648,16 @@ private class MacroCallItemNode extends AssocItemNode instanceof MacroCall {
648648
649649 override Visibility getVisibility ( ) { none ( ) }
650650
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+
651661 override predicate hasCanonicalPath ( Crate c ) { none ( ) }
652662
653663 override string getCanonicalPath ( Crate c ) { none ( ) }
@@ -1413,8 +1423,8 @@ private module Debug {
14131423 private Locatable getRelevantLocatable ( ) {
14141424 exists ( string filepath , int startline , int startcolumn , int endline , int endcolumn |
14151425 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 ]
14181428 )
14191429 }
14201430
@@ -1450,4 +1460,14 @@ private module Debug {
14501460 m = getRelevantLocatable ( ) and
14511461 fileImport ( m , f )
14521462 }
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+ }
14531473}
0 commit comments