Skip to content

Commit

Permalink
Rename to
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron1011 committed Nov 11, 2019
1 parent ee2dc4b commit 2ed1e89
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/librustc_mir/const_eval.rs
Expand Up @@ -337,7 +337,7 @@ impl<'mir, 'tcx> interpret::Machine<'mir, 'tcx> for CompileTimeInterpreter<'mir,
// Some functions we support even if they are non-const -- but avoid testing
// that for const fn! We certainly do *not* want to actually call the fn
// though, so be sure we return here.
return if ecx.hook_fn(instance, args, dest)? {
return if ecx.hook_panic_fn(instance, args, dest)? {
ecx.goto_block(ret)?; // fully evaluated and done
Ok(None)
} else {
Expand Down
5 changes: 3 additions & 2 deletions src/librustc_mir/interpret/intrinsics.rs
Expand Up @@ -354,9 +354,10 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
Ok(true)
}

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

0 comments on commit 2ed1e89

Please sign in to comment.