1
Fork 0

Add is_intrinsic helper

This commit is contained in:
Oli Scherer 2024-02-19 22:51:45 +00:00
parent 7606c13961
commit aa2ae6b491
6 changed files with 15 additions and 4 deletions

View file

@ -1231,7 +1231,7 @@ impl<'tcx> LateLintPass<'tcx> for MutableTransmutes {
}
fn def_id_is_transmute(cx: &LateContext<'_>, def_id: DefId) -> bool {
matches!(cx.tcx.intrinsic(def_id), Some(sym::transmute))
cx.tcx.is_intrinsic(def_id, sym::transmute)
}
}
}