@@ -212,10 +212,7 @@ abstract private class ModuleLikeNode extends ItemNode {
212
212
private class SourceFileItemNode extends ModuleLikeNode , SourceFile {
213
213
pragma [ nomagic]
214
214
ModuleLikeNode getSuper ( ) {
215
- exists ( ModuleItemNode mod |
216
- fileImport ( mod , this ) and
217
- result = mod .getASuccessor ( "super" )
218
- )
215
+ result = any ( ModuleItemNode mod | fileImport ( mod , this ) ) .getASuccessor ( "super" )
219
216
}
220
217
221
218
override string getName ( ) { result = "(source file)" }
@@ -858,11 +855,10 @@ private ItemNode resolvePathPrivate(
858
855
/**
859
856
* Gets a module that has access to private items defined inside `itemParent`.
860
857
*
861
- * According to
862
- *
863
- * https://web.mit.edu/rust-lang_v1.25/arch/amd64_ubuntu1404/share/doc/rust/html/book/second-edition/ch07-02-controlling-visibility-with-pub.html#privacy-rules
858
+ * According to [The Rust Reference][1] this is either `itemParent` itself or any
859
+ * descendant of `itemParent`.
864
860
*
865
- * this is either `itemParent` itself or any (transitive) child of `itemParent`.
861
+ * [1]: https://doc.rust-lang.org/reference/visibility-and-privacy.html#r-vis.access
866
862
*/
867
863
pragma [ nomagic]
868
864
private ModuleLikeNode getAPrivateVisibleModule ( ModuleLikeNode itemParent ) {
@@ -964,10 +960,6 @@ private module Debug {
964
960
private Locatable getRelevantLocatable ( ) {
965
961
exists ( string filepath , int startline , int startcolumn , int endline , int endcolumn |
966
962
result .getLocation ( ) .hasLocationInfo ( filepath , startline , startcolumn , endline , endcolumn ) and
967
- // filepath.matches("%/compile.rs") and
968
- // startline = 1986
969
- // filepath.matches("%/build_steps/mod.rs") and
970
- // startline = 17
971
963
filepath .matches ( "%/main.rs" ) and
972
964
startline = 1
973
965
)
0 commit comments