Update to some cleanups in rustc
This commit is contained in:
parent
aa9177fec6
commit
2671cf34a5
2 changed files with 3 additions and 2 deletions
|
|
@ -385,7 +385,7 @@ impl<'a, 'tcx> EvalContextExt<'tcx> for EvalContext<'a, 'tcx, super::Evaluator<'
|
|||
// compute global if not cached
|
||||
let val = match self.tcx.interpret_interner.borrow().get_cached(cid) {
|
||||
Some(ptr) => ptr,
|
||||
None => eval_body(self.tcx, instance, ty::ParamEnv::empty(traits::Reveal::All)).0?.0,
|
||||
None => eval_body(self.tcx, instance, ty::ParamEnv::empty(traits::Reveal::All))?.0,
|
||||
};
|
||||
let val = self.value_to_primval(ValTy { value: Value::ByRef(val), ty: args[0].ty })?.to_u64()?;
|
||||
if val == name {
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ extern crate lazy_static;
|
|||
use rustc::ty::{self, TyCtxt};
|
||||
use rustc::ty::layout::{TyLayout, LayoutOf};
|
||||
use rustc::hir::def_id::DefId;
|
||||
use rustc::ty::subst::Substs;
|
||||
use rustc::mir;
|
||||
use rustc::traits;
|
||||
|
||||
|
|
@ -157,7 +158,7 @@ pub fn eval_main<'a, 'tcx: 'a>(
|
|||
Ok(())
|
||||
}
|
||||
|
||||
let mut ecx = EvalContext::new(tcx, ty::ParamEnv::empty(traits::Reveal::All), limits, Default::default(), Default::default());
|
||||
let mut ecx = EvalContext::new(tcx, ty::ParamEnv::empty(traits::Reveal::All), limits, Default::default(), Default::default(), Substs::empty());
|
||||
match run_main(&mut ecx, main_id, start_wrapper) {
|
||||
Ok(()) => {
|
||||
let leaks = ecx.memory().leak_report();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue