@@ -26,7 +26,7 @@ pub(crate) fn const_caller_location(
26
26
( file, line, col) : ( Symbol , u32 , u32 ) ,
27
27
) -> ConstValue < ' _ > {
28
28
trace ! ( "const_caller_location: {}:{}:{}" , file, line, col) ;
29
- let mut ecx = mk_eval_cx ( tcx, DUMMY_SP , ty:: ParamEnv :: reveal_all ( ) , false ) ;
29
+ let mut ecx = mk_eval_cx ( tcx, DUMMY_SP , ty:: ParamEnv :: reveal_all ( ) , CanAccessStatics :: No ) ;
30
30
31
31
let loc_place = ecx. alloc_caller_location ( file, line, col) ;
32
32
if intern_const_alloc_recursive ( & mut ecx, InternKind :: Constant , & loc_place) . is_err ( ) {
@@ -55,10 +55,12 @@ pub(crate) fn eval_to_valtree<'tcx>(
55
55
56
56
// FIXME Need to provide a span to `eval_to_valtree`
57
57
let ecx = mk_eval_cx (
58
- tcx, DUMMY_SP , param_env,
58
+ tcx,
59
+ DUMMY_SP ,
60
+ param_env,
59
61
// It is absolutely crucial for soundness that
60
62
// we do not read from static items or other mutable memory.
61
- false ,
63
+ CanAccessStatics :: No ,
62
64
) ;
63
65
let place = ecx. raw_const_to_mplace ( const_alloc) . unwrap ( ) ;
64
66
debug ! ( ?place) ;
@@ -91,7 +93,7 @@ pub(crate) fn try_destructure_mir_constant<'tcx>(
91
93
val : mir:: ConstantKind < ' tcx > ,
92
94
) -> InterpResult < ' tcx , mir:: DestructuredConstant < ' tcx > > {
93
95
trace ! ( "destructure_mir_constant: {:?}" , val) ;
94
- let ecx = mk_eval_cx ( tcx, DUMMY_SP , param_env, false ) ;
96
+ let ecx = mk_eval_cx ( tcx, DUMMY_SP , param_env, CanAccessStatics :: No ) ;
95
97
let op = ecx. eval_mir_constant ( & val, None , None ) ?;
96
98
97
99
// We go to `usize` as we cannot allocate anything bigger anyway.
0 commit comments