diff options
| author | Ralf Jung <post@ralfj.de> | 2021-11-28 19:35:50 -0500 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2021-12-20 22:37:12 +0100 |
| commit | 11fb22d83aafd3f3ba66d54ff5ecdbfe5069cb83 (patch) | |
| tree | b0f5edaeb0b756e9196594b82e739825a2c6cfd4 /compiler/rustc_const_eval/src/const_eval | |
| parent | 84f962a89bac3948ed116f1ad04c2f4793fb69ea (diff) | |
| download | rust-11fb22d83aafd3f3ba66d54ff5ecdbfe5069cb83.tar.gz rust-11fb22d83aafd3f3ba66d54ff5ecdbfe5069cb83.zip | |
CTFE eval_fn_call: use FnAbi to determine argument skipping and compatibility
Diffstat (limited to 'compiler/rustc_const_eval/src/const_eval')
| -rw-r--r-- | compiler/rustc_const_eval/src/const_eval/machine.rs | 4 |
1 files changed, 2 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 550715abc10..d101c786c45 100644 --- a/compiler/rustc_const_eval/src/const_eval/machine.rs +++ b/compiler/rustc_const_eval/src/const_eval/machine.rs @@ -260,7 +260,7 @@ impl<'mir, 'tcx> interpret::Machine<'mir, 'tcx> for CompileTimeInterpreter<'mir, args: &[OpTy<'tcx>], _ret: Option<(&PlaceTy<'tcx>, mir::BasicBlock)>, _unwind: StackPopUnwind, // unwinding is not supported in consts - ) -> InterpResult<'tcx, Option<&'mir mir::Body<'tcx>>> { + ) -> InterpResult<'tcx, Option<(&'mir mir::Body<'tcx>, ty::Instance<'tcx>)>> { debug!("find_mir_or_eval_fn: {:?}", instance); // Only check non-glue functions @@ -283,7 +283,7 @@ impl<'mir, 'tcx> interpret::Machine<'mir, 'tcx> for CompileTimeInterpreter<'mir, } } // This is a const fn. Call it. - Ok(Some(ecx.load_mir(instance.def, None)?)) + Ok(Some((ecx.load_mir(instance.def, None)?, instance))) } fn call_intrinsic( |
