Find dest and the first arg of a Call
(
body: &Body<'tcx>,
loc: Location,
)
| 18 | |
| 19 | /// Find dest and the first arg of a Call |
| 20 | fn dest_args0<'tcx>( |
| 21 | body: &Body<'tcx>, |
| 22 | loc: Location, |
| 23 | ) -> Option<(Place<'tcx>, Option<Place<'tcx>>)> { |
| 24 | if let TerminatorKind::Call { |
| 25 | func: _func, |
| 26 | args, |
| 27 | destination, |
| 28 | .. |
| 29 | } = &body[loc.block].terminator().kind |
| 30 | { |
| 31 | let args0 = args.first().and_then(|op| op.node.place()); |
| 32 | return Some((*destination, args0)); |
| 33 | } |
| 34 | None |
| 35 | } |
| 36 | /// std::mem::drop(place); |
| 37 | fn collect_manual_drop<'tcx>( |
| 38 | callgraph: &CallGraph<'tcx>, |
no outgoing calls
no test coverage detected