Skip to content

Commit 2ed1e89

Browse files
committed
Rename to
1 parent ee2dc4b commit 2ed1e89

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/librustc_mir/const_eval.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ impl<'mir, 'tcx> interpret::Machine<'mir, 'tcx> for CompileTimeInterpreter<'mir,
337337
// Some functions we support even if they are non-const -- but avoid testing
338338
// that for const fn! We certainly do *not* want to actually call the fn
339339
// though, so be sure we return here.
340-
return if ecx.hook_fn(instance, args, dest)? {
340+
return if ecx.hook_panic_fn(instance, args, dest)? {
341341
ecx.goto_block(ret)?; // fully evaluated and done
342342
Ok(None)
343343
} else {

src/librustc_mir/interpret/intrinsics.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -354,9 +354,10 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
354354
Ok(true)
355355
}
356356

357-
/// "Intercept" a function call because we have something special to do for it.
357+
/// "Intercept" a function call to a panic-related function
358+
/// because we have something special to do for it.
358359
/// Returns `true` if an intercept happened.
359-
pub fn hook_fn(
360+
pub fn hook_panic_fn(
360361
&mut self,
361362
instance: ty::Instance<'tcx>,
362363
args: &[OpTy<'tcx, M::PointerTag>],

0 commit comments

Comments
 (0)