Make is_intrinsic query return the intrinsic name

This commit is contained in:
Oli Scherer 2024-01-30 14:20:22 +00:00
parent de4d615e6b
commit 0eee945680
22 changed files with 38 additions and 43 deletions

View file

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