@@ -21,7 +21,7 @@ use syntax::source_map::{Span, DUMMY_SP};
2121
2222use crate :: interpret:: { self ,
2323 PlaceTy , MPlaceTy , OpTy , ImmTy , Immediate , Scalar , Pointer ,
24- RawConst , ConstValue ,
24+ RawConst , ConstValue , Machine ,
2525 InterpResult , InterpErrorInfo , GlobalId , InterpCx , StackPopCleanup ,
2626 Allocation , AllocId , MemoryKind , Memory ,
2727 snapshot, RefTracking , intern_const_alloc_recursive,
@@ -41,7 +41,7 @@ const DETECTOR_SNAPSHOT_PERIOD: isize = 256;
4141/// that inform us about the generic bounds of the constant. E.g., using an associated constant
4242/// of a function's generic parameter will require knowledge about the bounds on the generic
4343/// parameter. These bounds are passed to `mk_eval_cx` via the `ParamEnv` argument.
44- pub ( crate ) fn mk_eval_cx < ' mir , ' tcx > (
44+ fn mk_eval_cx < ' mir , ' tcx > (
4545 tcx : TyCtxt < ' tcx > ,
4646 span : Span ,
4747 param_env : ty:: ParamEnv < ' tcx > ,
@@ -169,7 +169,7 @@ fn eval_body_using_ecx<'mir, 'tcx>(
169169}
170170
171171#[ derive( Clone , Debug ) ]
172- enum ConstEvalError {
172+ pub enum ConstEvalError {
173173 NeedsRfc ( String ) ,
174174}
175175
@@ -521,8 +521,8 @@ pub fn const_variant_index<'tcx>(
521521/// Turn an interpreter error into something to report to the user.
522522/// As a side-effect, if RUSTC_CTFE_BACKTRACE is set, this prints the backtrace.
523523/// Should be called only if the error is actually going to to be reported!
524- pub fn error_to_const_error < ' mir , ' tcx > (
525- ecx : & InterpCx < ' mir , ' tcx , CompileTimeInterpreter < ' mir , ' tcx > > ,
524+ pub fn error_to_const_error < ' mir , ' tcx , M : Machine < ' mir , ' tcx > > (
525+ ecx : & InterpCx < ' mir , ' tcx , M > ,
526526 mut error : InterpErrorInfo < ' tcx > ,
527527) -> ConstEvalErr < ' tcx > {
528528 error. print_backtrace ( ) ;
0 commit comments