Skip to content

Commit f15197e

Browse files
committed
find_fn -> find_mir_or_eval_fn rename
1 parent 735a610 commit f15197e

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

src/librustc_mir/const_eval.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,14 +328,14 @@ impl<'mir, 'tcx> interpret::Machine<'mir, 'tcx> for CompileTimeInterpreter<'mir,
328328
false // for now, we don't enforce validity
329329
}
330330

331-
fn find_fn(
331+
fn find_mir_or_eval_fn(
332332
ecx: &mut InterpCx<'mir, 'tcx, Self>,
333333
instance: ty::Instance<'tcx>,
334334
args: &[OpTy<'tcx>],
335335
ret: Option<(PlaceTy<'tcx>, mir::BasicBlock)>,
336336
_unwind: Option<mir::BasicBlock> // unwinding is not supported in consts
337337
) -> InterpResult<'tcx, Option<&'mir mir::Body<'tcx>>> {
338-
debug!("eval_fn_call: {:?}", instance);
338+
debug!("find_mir_or_eval_fn: {:?}", instance);
339339

340340
// If this function is a `const fn` then as an optimization we can query this
341341
// evaluation immediately.

src/librustc_mir/interpret/machine.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ pub trait Machine<'mir, 'tcx>: Sized {
146146
/// nor just jump to `ret`, but instead push their own stack frame.)
147147
/// Passing `dest`and `ret` in the same `Option` proved very annoying when only one of them
148148
/// was used.
149-
fn find_fn(
149+
fn find_mir_or_eval_fn(
150150
ecx: &mut InterpCx<'mir, 'tcx, Self>,
151151
instance: ty::Instance<'tcx>,
152152
args: &[OpTy<'tcx, Self::PointerTag>],

src/librustc_mir/interpret/terminator.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
285285
ty::InstanceDef::CloneShim(..) |
286286
ty::InstanceDef::Item(_) => {
287287
// We need MIR for this fn
288-
let body = match M::find_fn(self, instance, args, ret, unwind)? {
288+
let body = match M::find_mir_or_eval_fn(self, instance, args, ret, unwind)? {
289289
Some(body) => body,
290290
None => return Ok(()),
291291
};

src/librustc_mir/transform/const_prop.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ impl<'mir, 'tcx> interpret::Machine<'mir, 'tcx> for ConstPropMachine {
139139
false
140140
}
141141

142-
fn find_fn(
142+
fn find_mir_or_eval_fn(
143143
_ecx: &mut InterpCx<'mir, 'tcx, Self>,
144144
_instance: ty::Instance<'tcx>,
145145
_args: &[OpTy<'tcx>],

0 commit comments

Comments
 (0)