@@ -22,7 +22,7 @@ use syntax::source_map::{Span, DUMMY_SP};
2222use crate :: interpret:: { self ,
2323 PlaceTy , MPlaceTy , OpTy , ImmTy , Immediate , Scalar ,
2424 RawConst , ConstValue ,
25- InterpResult , InterpErrorInfo , InterpError , GlobalId , InterpretCx , StackPopCleanup ,
25+ InterpResult , InterpErrorInfo , InterpError , GlobalId , InterpCx , StackPopCleanup ,
2626 Allocation , AllocId , MemoryKind , Memory ,
2727 snapshot, RefTracking , intern_const_alloc_recursive,
2828} ;
@@ -34,7 +34,7 @@ const STEPS_UNTIL_DETECTOR_ENABLED: isize = 1_000_000;
3434/// Should be a power of two for performance reasons.
3535const DETECTOR_SNAPSHOT_PERIOD : isize = 256 ;
3636
37- /// The `InterpretCx ` is only meant to be used to do field and index projections into constants for
37+ /// The `InterpCx ` is only meant to be used to do field and index projections into constants for
3838/// `simd_shuffle` and const patterns in match arms.
3939///
4040/// The function containing the `match` that is currently being analyzed may have generic bounds
@@ -47,7 +47,7 @@ pub(crate) fn mk_eval_cx<'mir, 'tcx>(
4747 param_env : ty:: ParamEnv < ' tcx > ,
4848) -> CompileTimeEvalContext < ' mir , ' tcx > {
4949 debug ! ( "mk_eval_cx: {:?}" , param_env) ;
50- InterpretCx :: new ( tcx. at ( span) , param_env, CompileTimeInterpreter :: new ( ) )
50+ InterpCx :: new ( tcx. at ( span) , param_env, CompileTimeInterpreter :: new ( ) )
5151}
5252
5353pub ( crate ) fn eval_promoted < ' mir , ' tcx > (
@@ -303,7 +303,7 @@ impl<K: Hash + Eq, V> interpret::AllocMap<K, V> for FxHashMap<K, V> {
303303}
304304
305305crate type CompileTimeEvalContext < ' mir , ' tcx > =
306- InterpretCx < ' mir , ' tcx , CompileTimeInterpreter < ' mir , ' tcx > > ;
306+ InterpCx < ' mir , ' tcx , CompileTimeInterpreter < ' mir , ' tcx > > ;
307307
308308impl interpret:: MayLeak for ! {
309309 #[ inline( always) ]
@@ -326,12 +326,12 @@ impl<'mir, 'tcx> interpret::Machine<'mir, 'tcx> for CompileTimeInterpreter<'mir,
326326 const STATIC_KIND : Option < !> = None ; // no copying of statics allowed
327327
328328 #[ inline( always) ]
329- fn enforce_validity ( _ecx : & InterpretCx < ' mir , ' tcx , Self > ) -> bool {
329+ fn enforce_validity ( _ecx : & InterpCx < ' mir , ' tcx , Self > ) -> bool {
330330 false // for now, we don't enforce validity
331331 }
332332
333333 fn find_fn (
334- ecx : & mut InterpretCx < ' mir , ' tcx , Self > ,
334+ ecx : & mut InterpCx < ' mir , ' tcx , Self > ,
335335 instance : ty:: Instance < ' tcx > ,
336336 args : & [ OpTy < ' tcx > ] ,
337337 dest : Option < PlaceTy < ' tcx > > ,
@@ -371,7 +371,7 @@ impl<'mir, 'tcx> interpret::Machine<'mir, 'tcx> for CompileTimeInterpreter<'mir,
371371 }
372372
373373 fn call_intrinsic (
374- ecx : & mut InterpretCx < ' mir , ' tcx , Self > ,
374+ ecx : & mut InterpCx < ' mir , ' tcx , Self > ,
375375 instance : ty:: Instance < ' tcx > ,
376376 args : & [ OpTy < ' tcx > ] ,
377377 dest : PlaceTy < ' tcx > ,
@@ -387,7 +387,7 @@ impl<'mir, 'tcx> interpret::Machine<'mir, 'tcx> for CompileTimeInterpreter<'mir,
387387 }
388388
389389 fn ptr_op (
390- _ecx : & InterpretCx < ' mir , ' tcx , Self > ,
390+ _ecx : & InterpCx < ' mir , ' tcx , Self > ,
391391 _bin_op : mir:: BinOp ,
392392 _left : ImmTy < ' tcx > ,
393393 _right : ImmTy < ' tcx > ,
@@ -424,15 +424,15 @@ impl<'mir, 'tcx> interpret::Machine<'mir, 'tcx> for CompileTimeInterpreter<'mir,
424424 }
425425
426426 fn box_alloc (
427- _ecx : & mut InterpretCx < ' mir , ' tcx , Self > ,
427+ _ecx : & mut InterpCx < ' mir , ' tcx , Self > ,
428428 _dest : PlaceTy < ' tcx > ,
429429 ) -> InterpResult < ' tcx > {
430430 Err (
431431 ConstEvalError :: NeedsRfc ( "heap allocations via `box` keyword" . to_string ( ) ) . into ( ) ,
432432 )
433433 }
434434
435- fn before_terminator ( ecx : & mut InterpretCx < ' mir , ' tcx , Self > ) -> InterpResult < ' tcx > {
435+ fn before_terminator ( ecx : & mut InterpCx < ' mir , ' tcx , Self > ) -> InterpResult < ' tcx > {
436436 {
437437 let steps = & mut ecx. machine . steps_since_detector_enabled ;
438438
@@ -457,13 +457,13 @@ impl<'mir, 'tcx> interpret::Machine<'mir, 'tcx> for CompileTimeInterpreter<'mir,
457457 }
458458
459459 #[ inline( always) ]
460- fn stack_push ( _ecx : & mut InterpretCx < ' mir , ' tcx , Self > ) -> InterpResult < ' tcx > {
460+ fn stack_push ( _ecx : & mut InterpCx < ' mir , ' tcx , Self > ) -> InterpResult < ' tcx > {
461461 Ok ( ( ) )
462462 }
463463
464464 /// Called immediately before a stack frame gets popped.
465465 #[ inline( always) ]
466- fn stack_pop ( _ecx : & mut InterpretCx < ' mir , ' tcx , Self > , _extra : ( ) ) -> InterpResult < ' tcx > {
466+ fn stack_pop ( _ecx : & mut InterpCx < ' mir , ' tcx , Self > , _extra : ( ) ) -> InterpResult < ' tcx > {
467467 Ok ( ( ) )
468468 }
469469}
@@ -508,7 +508,7 @@ pub fn const_variant_index<'tcx>(
508508}
509509
510510pub fn error_to_const_error < ' mir , ' tcx > (
511- ecx : & InterpretCx < ' mir , ' tcx , CompileTimeInterpreter < ' mir , ' tcx > > ,
511+ ecx : & InterpCx < ' mir , ' tcx , CompileTimeInterpreter < ' mir , ' tcx > > ,
512512 mut error : InterpErrorInfo < ' tcx > ,
513513) -> ConstEvalErr < ' tcx > {
514514 error. print_backtrace ( ) ;
@@ -632,7 +632,7 @@ pub fn const_eval_raw_provider<'tcx>(
632632 }
633633
634634 let span = tcx. def_span ( cid. instance . def_id ( ) ) ;
635- let mut ecx = InterpretCx :: new ( tcx. at ( span) , key. param_env , CompileTimeInterpreter :: new ( ) ) ;
635+ let mut ecx = InterpCx :: new ( tcx. at ( span) , key. param_env , CompileTimeInterpreter :: new ( ) ) ;
636636
637637 let res = ecx. load_mir ( cid. instance . def ) ;
638638 res. map ( |body| {
0 commit comments