@@ -28,14 +28,19 @@ module ModelGeneratorInput implements ModelGeneratorInputSig<Location, RustDataF
28
28
}
29
29
30
30
private predicate relevant ( Function api ) {
31
- // This excludes closures (these are not exported API endpoints) and
32
- // functions without a `pub` visiblity. A function can be `pub` without
33
- // ultimately being exported by a crate, so this is an overapproximation.
34
- api .hasVisibility ( )
35
- or
36
- // If a method implements a public trait it is exposed through the trait.
37
- // We overapproximate this by including all trait method implementations.
38
- exists ( Impl impl | impl .hasTrait ( ) and impl .getAssocItemList ( ) .getAssocItem ( _) = api )
31
+ // Only include functions that have a resolved path.
32
+ api .hasCrateOrigin ( ) and
33
+ api .hasExtendedCanonicalPath ( ) and
34
+ (
35
+ // This excludes closures (these are not exported API endpoints) and
36
+ // functions without a `pub` visiblity. A function can be `pub` without
37
+ // ultimately being exported by a crate, so this is an overapproximation.
38
+ api .hasVisibility ( )
39
+ or
40
+ // If a method implements a public trait it is exposed through the trait.
41
+ // We overapproximate this by including all trait method implementations.
42
+ exists ( Impl impl | impl .hasTrait ( ) and impl .getAssocItemList ( ) .getAssocItem ( _) = api )
43
+ )
39
44
}
40
45
41
46
predicate isUninterestingForDataFlowModels ( Callable api ) { none ( ) }
@@ -169,12 +174,7 @@ module ModelGeneratorInput implements ModelGeneratorInputSig<Location, RustDataF
169
174
}
170
175
171
176
string partialModelRow ( Callable api , int i ) {
172
- i = 0 and
173
- (
174
- result = api .( Function ) .getCrateOrigin ( )
175
- or
176
- not api .( Function ) .hasCrateOrigin ( ) and result = ""
177
- ) // crate
177
+ i = 0 and result = api .( Function ) .getCrateOrigin ( ) // crate
178
178
or
179
179
i = 1 and result = api .( Function ) .getExtendedCanonicalPath ( ) // name
180
180
}
0 commit comments