MCPcopy Create free account
hub / github.com/CodeSentryAI/lockbud / instance_to_index

Method instance_to_index

src/analysis/callgraph/mod.rs:82–87  ·  view source on GitHub ↗

Search for the InstanceId of a given instance in CallGraph.

(&self, instance: &Instance<'tcx>)

Source from the content-addressed store, hash-verified

80 }
81 }
82
83 /// Search for the InstanceId of a given instance in CallGraph.
84 pub fn instance_to_index(&self, instance: &Instance<'tcx>) -> Option<InstanceId> {
85 self.graph
86 .node_references()
87 .find(|(_idx, inst)| inst.match_instance(instance))
88 .map(|(idx, _)| idx)
89 }
90

Callers 2

closure_defsite_argsFunction · 0.80
analyzeMethod · 0.80

Calls 1

match_instanceMethod · 0.80

Tested by

no test coverage detected