Skip to content

Commit

Permalink
Remove an unused parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
WaffleLapkin committed Feb 18, 2024
1 parent 98c1f0f commit 0bd2727
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 5 deletions.
1 change: 0 additions & 1 deletion compiler/rustc_const_eval/src/const_eval/machine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,6 @@ impl<'mir, 'tcx> interpret::Machine<'mir, 'tcx> for CompileTimeInterpreter<'mir,
fn find_mir_or_extra_fn(
ecx: &mut InterpCx<'mir, 'tcx, Self>,
instance: ty::Instance<'tcx>,
_abi: CallAbi,
) -> InterpResult<'tcx, Either<&'mir mir::Body<'tcx>, Self::ExtraFnVal>> {
debug!("find_mir_or_extra_fn: {:?}", instance);

Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_const_eval/src/interpret/machine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,6 @@ pub trait Machine<'mir, 'tcx: 'mir>: Sized {
fn find_mir_or_extra_fn(
ecx: &mut InterpCx<'mir, 'tcx, Self>,
instance: ty::Instance<'tcx>,
abi: CallAbi,
) -> InterpResult<'tcx, Either<&'mir mir::Body<'tcx>, Self::ExtraFnVal>>;

/// Execute `fn_val`. It is the hook's responsibility to advance the instruction
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_const_eval/src/interpret/terminator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
| ty::InstanceDef::ThreadLocalShim(..)
| ty::InstanceDef::Item(_) => {
// We need MIR for this fn
let body = match M::find_mir_or_extra_fn(self, instance, caller_abi)? {
let body = match M::find_mir_or_extra_fn(self, instance)? {
Either::Left(b) => b,
Either::Right(f) => {
return M::call_extra_fn(
Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_mir_transform/src/dataflow_const_prop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -904,7 +904,6 @@ impl<'mir, 'tcx: 'mir> rustc_const_eval::interpret::Machine<'mir, 'tcx> for Dumm
fn find_mir_or_extra_fn(
_ecx: &mut InterpCx<'mir, 'tcx, Self>,
_instance: ty::Instance<'tcx>,
_abi: rustc_target::spec::abi::Abi,
) -> interpret::InterpResult<'tcx, Either<&'mir Body<'tcx>, Self::ExtraFnVal>> {
unimplemented!()
}
Expand Down
1 change: 0 additions & 1 deletion src/tools/miri/src/machine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -943,7 +943,6 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for MiriMachine<'mir, 'tcx> {
fn find_mir_or_extra_fn(
ecx: &mut MiriInterpCx<'mir, 'tcx>,
instance: ty::Instance<'tcx>,
abi: Abi,
) -> InterpResult<'tcx, Either<&'mir mir::Body<'tcx>, ExtraFnVal>> {
// For foreign items, we return `ExtraFnVal::ForeignFn` to later try to see if we can
// emulate them.
Expand Down

0 comments on commit 0bd2727

Please sign in to comment.