@@ -1404,18 +1404,20 @@ private predicate useImportEdge(Use use, string name, ItemNode item) {
1404
1404
}
1405
1405
1406
1406
/**
1407
- * Holds if `i` is available inside `f` because it is reexported in [the prelude][1].
1407
+ * Holds if `i` is available inside `f` because it is reexported in
1408
+ * [the `core` prelude][1] or [the `std` prelude][2].
1408
1409
*
1409
1410
* We don't yet have access to prelude information from the extractor, so for now
1410
1411
* we include all the preludes for Rust: 2015, 2018, 2021, and 2024.
1411
1412
*
1412
1413
* [1]: https://doc.rust-lang.org/core/prelude/index.html
1414
+ * [2]: https://doc.rust-lang.org/std/prelude/index.html
1413
1415
*/
1414
1416
private predicate preludeEdge ( SourceFile f , string name , ItemNode i ) {
1415
- exists ( Crate core , ModuleLikeNode mod , ModuleItemNode prelude , ModuleItemNode rust |
1416
- f = any ( Crate c0 | core = c0 .getDependency ( _) or core = c0 ) .getASourceFile ( ) and
1417
- core .getName ( ) = " core" and
1418
- mod = core .getSourceFile ( ) and
1417
+ exists ( Crate stdOrCore , ModuleLikeNode mod , ModuleItemNode prelude , ModuleItemNode rust |
1418
+ f = any ( Crate c0 | stdOrCore = c0 .getDependency ( _) or stdOrCore = c0 ) .getASourceFile ( ) and
1419
+ stdOrCore .getName ( ) = [ "std" , " core"] and
1420
+ mod = stdOrCore .getSourceFile ( ) and
1419
1421
prelude = mod .getASuccessorRec ( "prelude" ) and
1420
1422
rust = prelude .getASuccessorRec ( [ "rust_2015" , "rust_2018" , "rust_2021" , "rust_2024" ] ) and
1421
1423
i = rust .getASuccessorRec ( name ) and
0 commit comments