about summary refs log tree commit diff
path: root/compiler/rustc_const_eval/src/const_eval/machine.rs
diff options
context:
space:
mode:
authorJacob Pratt <jacob@jhpratt.dev>2024-12-20 01:36:47 -0500
committerGitHub <noreply@github.com>2024-12-20 01:36:47 -0500
commita53204f978488fb8b81b0cf85f8cef73ab7e9bb5 (patch)
treeb66aa92061dafd651016f81b0ee674616e9da249 /compiler/rustc_const_eval/src/const_eval/machine.rs
parent1ec6d093b7595073bbaef66fcad8308221ac5dc8 (diff)
parentfd8b983452841ef04b9a15cf2259caedf5fe3c66 (diff)
downloadrust-a53204f978488fb8b81b0cf85f8cef73ab7e9bb5.tar.gz
rust-a53204f978488fb8b81b0cf85f8cef73ab7e9bb5.zip
Rollup merge of #133103 - tiif:fnabi, r=RalfJung
Pass FnAbi to find_mir_or_eval_fn

 https://github.com/rust-lang/miri/issues/4013 needs information from ``FnAbi``, hence it is passed to ``find_mir_or_eval_fn``.

r? `@RalfJung`
Diffstat (limited to 'compiler/rustc_const_eval/src/const_eval/machine.rs')
-rw-r--r--compiler/rustc_const_eval/src/const_eval/machine.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/rustc_const_eval/src/const_eval/machine.rs b/compiler/rustc_const_eval/src/const_eval/machine.rs
index 9c660ef0b18..ba7fbb254c6 100644
--- a/compiler/rustc_const_eval/src/const_eval/machine.rs
+++ b/compiler/rustc_const_eval/src/const_eval/machine.rs
@@ -2,7 +2,7 @@ use std::borrow::{Borrow, Cow};
 use std::fmt;
 use std::hash::Hash;
 
-use rustc_abi::{Align, ExternAbi, Size};
+use rustc_abi::{Align, Size};
 use rustc_ast::Mutability;
 use rustc_data_structures::fx::{FxHashMap, FxIndexMap, IndexEntry};
 use rustc_hir::def_id::{DefId, LocalDefId};
@@ -14,6 +14,7 @@ use rustc_middle::ty::layout::{HasTypingEnv, TyAndLayout};
 use rustc_middle::ty::{self, Ty, TyCtxt};
 use rustc_middle::{bug, mir};
 use rustc_span::{Span, Symbol, sym};
+use rustc_target::callconv::FnAbi;
 use tracing::debug;
 
 use super::error::*;
@@ -339,7 +340,7 @@ impl<'tcx> interpret::Machine<'tcx> for CompileTimeMachine<'tcx> {
     fn find_mir_or_eval_fn(
         ecx: &mut InterpCx<'tcx, Self>,
         orig_instance: ty::Instance<'tcx>,
-        _abi: ExternAbi,
+        _abi: &FnAbi<'tcx, Ty<'tcx>>,
         args: &[FnArg<'tcx>],
         dest: &MPlaceTy<'tcx>,
         ret: Option<mir::BasicBlock>,