]> git.lizzy.rs Git - rust.git/commitdiff
`find_fn` -> `find_mir_or_eval_fn` rename
authorOliver Scherer <github35764891676564198441@oli-obk.de>
Sat, 30 Nov 2019 16:53:02 +0000 (17:53 +0100)
committerOliver Scherer <github35764891676564198441@oli-obk.de>
Sat, 30 Nov 2019 16:53:02 +0000 (17:53 +0100)
src/librustc_mir/const_eval.rs
src/librustc_mir/interpret/machine.rs
src/librustc_mir/interpret/terminator.rs
src/librustc_mir/transform/const_prop.rs

index 005d3b217eb3de22d086ab20cf9d62b0a5edca14..133ab31524723f0a031a5a8b5da2a2090abf86c7 100644 (file)
@@ -328,14 +328,14 @@ fn enforce_validity(_ecx: &InterpCx<'mir, 'tcx, Self>) -> bool {
         false // for now, we don't enforce validity
     }
 
-    fn find_fn(
+    fn find_mir_or_eval_fn(
         ecx: &mut InterpCx<'mir, 'tcx, Self>,
         instance: ty::Instance<'tcx>,
         args: &[OpTy<'tcx>],
         ret: Option<(PlaceTy<'tcx>, mir::BasicBlock)>,
         _unwind: Option<mir::BasicBlock> // unwinding is not supported in consts
     ) -> InterpResult<'tcx, Option<&'mir mir::Body<'tcx>>> {
-        debug!("eval_fn_call: {:?}", instance);
+        debug!("find_mir_or_eval_fn: {:?}", instance);
 
         // If this function is a `const fn` then as an optimization we can query this
         // evaluation immediately.
index b7cde626415a7653f321868b8ce3b807a4dcb109..7f5873cebf621feb6dc00b670d11a8b373377665 100644 (file)
@@ -146,7 +146,7 @@ pub trait Machine<'mir, 'tcx>: Sized {
     /// nor just jump to `ret`, but instead push their own stack frame.)
     /// Passing `dest`and `ret` in the same `Option` proved very annoying when only one of them
     /// was used.
-    fn find_fn(
+    fn find_mir_or_eval_fn(
         ecx: &mut InterpCx<'mir, 'tcx, Self>,
         instance: ty::Instance<'tcx>,
         args: &[OpTy<'tcx, Self::PointerTag>],
index ed037570d6db89624b74b5cc9fffcd8a3ff57236..674051ecd8f16c3232c99cb23d97f056150c6fcc 100644 (file)
@@ -285,7 +285,7 @@ fn eval_fn_call(
             ty::InstanceDef::CloneShim(..) |
             ty::InstanceDef::Item(_) => {
                 // We need MIR for this fn
-                let body = match M::find_fn(self, instance, args, ret, unwind)? {
+                let body = match M::find_mir_or_eval_fn(self, instance, args, ret, unwind)? {
                     Some(body) => body,
                     None => return Ok(()),
                 };
index 8de16308e8375c950e24fb05fdbce3684f721613..22f25aa93a3921bfed5f55f88bfd4ff2764eaab5 100644 (file)
@@ -139,7 +139,7 @@ fn enforce_validity(_ecx: &InterpCx<'mir, 'tcx, Self>) -> bool {
         false
     }
 
-    fn find_fn(
+    fn find_mir_or_eval_fn(
         _ecx: &mut InterpCx<'mir, 'tcx, Self>,
         _instance: ty::Instance<'tcx>,
         _args: &[OpTy<'tcx>],