diff options
| author | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2024-01-30 14:20:22 +0000 |
|---|---|---|
| committer | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2024-02-12 09:33:52 +0000 |
| commit | 0eee945680754e30f0f40fb051f98ffc7b1d8c62 (patch) | |
| tree | 6b22c4fe342dad9b2487618e9d6ddbfb5516795b /compiler/rustc_mir_transform/src/cost_checker.rs | |
| parent | de4d615e6b86f7ef6deacd24610b0678230b8af3 (diff) | |
| download | rust-0eee945680754e30f0f40fb051f98ffc7b1d8c62.tar.gz rust-0eee945680754e30f0f40fb051f98ffc7b1d8c62.zip | |
Make `is_intrinsic` query return the intrinsic name
Diffstat (limited to 'compiler/rustc_mir_transform/src/cost_checker.rs')
| -rw-r--r-- | compiler/rustc_mir_transform/src/cost_checker.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_mir_transform/src/cost_checker.rs b/compiler/rustc_mir_transform/src/cost_checker.rs index 79bed960b95..2c692c95003 100644 --- a/compiler/rustc_mir_transform/src/cost_checker.rs +++ b/compiler/rustc_mir_transform/src/cost_checker.rs @@ -70,7 +70,7 @@ impl<'tcx> Visitor<'tcx> for CostChecker<'_, 'tcx> { TerminatorKind::Call { func: Operand::Constant(ref f), unwind, .. } => { let fn_ty = self.instantiate_ty(f.const_.ty()); self.cost += if let ty::FnDef(def_id, _) = *fn_ty.kind() - && tcx.is_intrinsic(def_id) + && tcx.intrinsic(def_id).is_some() { // Don't give intrinsics the extra penalty for calls INSTR_COST |
