We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6aee16d commit c598b26Copy full SHA for c598b26
src/scanner.rs
@@ -1170,7 +1170,9 @@ where
1170
// the function the pointer points to has potential
1171
// effects itself at the end of the scan
1172
if matches!(eff_type, Effect::FnPtrCreation) {
1173
- self.data.fn_ptr_effects.push(eff);
+ if self.sinks.is_empty() || self.sinks.contains(callee.as_path()) {
1174
+ self.data.fn_ptr_effects.push(eff);
1175
+ }
1176
} else {
1177
self.data.effects.push(eff);
1178
self.data.fns_with_effects.insert(caller.clone());
@@ -1435,7 +1437,7 @@ pub fn scan_crate_with_sinks(
1435
1437
scan_results
1436
1438
.effects
1439
.retain(|e| EffectType::matches_effect(relevant_effects, e.eff_type()));
-
1440
+
1441
Ok(scan_results)
1442
}
1443
0 commit comments