diff options
| author | bors <bors@rust-lang.org> | 2022-05-17 09:39:26 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-05-17 09:39:26 +0000 |
| commit | 735efc0c703812343a5e5d19b600dac73b8a89f0 (patch) | |
| tree | 59db2d0d1eba880d8a0b83c2e1a64d346a288551 /compiler/rustc_mir_dataflow/src | |
| parent | 7355d971a954ed63293e4191f6677f60c1bc07d9 (diff) | |
| parent | 0a6b69106eb1df116404a3be123baf100e6cdf21 (diff) | |
| download | rust-735efc0c703812343a5e5d19b600dac73b8a89f0.tar.gz rust-735efc0c703812343a5e5d19b600dac73b8a89f0.zip | |
Auto merge of #97012 - oli-obk:🦀_intrinsics, r=davidtwco
Add a query for checking whether a function is an intrinsic. work towards #93145 This will reduce churn when we add more ways to declare intrinsics r? `@scottmcm`
Diffstat (limited to 'compiler/rustc_mir_dataflow/src')
| -rw-r--r-- | compiler/rustc_mir_dataflow/src/rustc_peek.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/compiler/rustc_mir_dataflow/src/rustc_peek.rs b/compiler/rustc_mir_dataflow/src/rustc_peek.rs index cc9ee1016c6..2f884887ad9 100644 --- a/compiler/rustc_mir_dataflow/src/rustc_peek.rs +++ b/compiler/rustc_mir_dataflow/src/rustc_peek.rs @@ -1,6 +1,5 @@ use rustc_span::symbol::sym; use rustc_span::Span; -use rustc_target::spec::abi::Abi; use rustc_index::bit_set::BitSet; use rustc_middle::mir::MirPass; @@ -193,9 +192,8 @@ impl PeekCall { &terminator.kind { if let ty::FnDef(def_id, substs) = *func.literal.ty().kind() { - let sig = tcx.fn_sig(def_id); let name = tcx.item_name(def_id); - if sig.abi() != Abi::RustIntrinsic || name != sym::rustc_peek { + if !tcx.is_intrinsic(def_id) || name != sym::rustc_peek { return None; } |
