Combine individual limit queries into single limits query

This commit is contained in:
Aaron Hill 2021-07-04 13:02:51 -05:00
parent ff15b5e2c7
commit 7e5a88a56c
No known key found for this signature in database
GPG key ID: B4087E510E98B164
20 changed files with 75 additions and 55 deletions

View file

@ -98,7 +98,7 @@ pub(super) fn mk_eval_cx<'mir, 'tcx>(
tcx,
root_span,
param_env,
CompileTimeInterpreter::new(tcx.const_eval_limit(())),
CompileTimeInterpreter::new(tcx.const_eval_limit()),
MemoryExtra { can_access_statics },
)
}
@ -300,7 +300,7 @@ pub fn eval_to_allocation_raw_provider<'tcx>(
tcx,
tcx.def_span(def.did),
key.param_env,
CompileTimeInterpreter::new(tcx.const_eval_limit(())),
CompileTimeInterpreter::new(tcx.const_eval_limit()),
// Statics (and promoteds inside statics) may access other statics, because unlike consts
// they do not have to behave "as if" they were evaluated at runtime.
MemoryExtra { can_access_statics: is_static },