pub fn check_unsafety(tcx: TyCtxt<'_>, def: WithOptConstParam<LocalDefId>)