Search for the InstanceId of a given instance in CallGraph.
(&self, instance: &Instance<'tcx>)
| 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 |
no test coverage detected