pub fn hir_contains_unsafe(tcx: TyCtxt<'_>, body_id: BodyId) -> boolExpand description
Fast HIR-level pre-check: does this function contain unsafe blocks
or is it declared unsafe fn?
This is a cheap check that can quickly filter out functions that are entirely safe and have no unsafe operations of any kind.