1
Fork 0

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

@ -202,8 +202,7 @@ impl PeekCall {
&terminator.kind
{
if let ty::FnDef(def_id, fn_args) = *func.const_.ty().kind() {
let name = tcx.item_name(def_id);
if !tcx.is_intrinsic(def_id) || name != sym::rustc_peek {
if tcx.intrinsic(def_id)? != sym::rustc_peek {
return None;
}