pub fn collect_unsafe_callsites<'tcx>(
tcx: TyCtxt<'tcx>,
def_id: DefId,
) -> Vec<Checkpoint<'tcx>>Expand description
Collect unsafe calls in def_id’s optimized MIR as verification checkpoints.
This includes unsafe Call and TailCall terminators and calls to assume
or copy_nonoverlapping that rustc lowered to intrinsic statements. A direct
call records its DefId; an unsafe function-pointer call has no known callee
and records None. Each checkpoint retains the call arguments and MIR position
for later contract lookup and path analysis. Functions without MIR yield no
checkpoints. Raw-pointer dereferences and static mut accesses are collected
separately.
§Agent Rules
Do not modify this function without human permission.