rustup
This commit is contained in:
parent
ab39e09b82
commit
67151a712d
4 changed files with 5 additions and 5 deletions
|
|
@ -1 +1 @@
|
|||
5c5c8eb864e56ce905742b8e97df5506bba6aeef
|
||||
e862c01aadb2d029864f7bb256cf6c85bbb5d7e4
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
|
|||
let this = self.eval_context_mut();
|
||||
|
||||
// Push frame.
|
||||
let mir = this.load_mir(f.def, None)?.body();
|
||||
let mir = &*this.load_mir(f.def, None)?;
|
||||
let span = this.stack().last()
|
||||
.and_then(Frame::current_source_info)
|
||||
.map(|si| si.span)
|
||||
|
|
|
|||
|
|
@ -141,14 +141,14 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
|
|||
.expect("No panic runtime found!");
|
||||
let panic_runtime = tcx.crate_name(*panic_runtime);
|
||||
let start_panic_instance = this.resolve_path(&[&*panic_runtime.as_str(), "__rust_start_panic"])?;
|
||||
return Ok(Some(this.load_mir(start_panic_instance.def, None)?.body()));
|
||||
return Ok(Some(&*this.load_mir(start_panic_instance.def, None)?));
|
||||
}
|
||||
// Similarly, we forward calls to the `panic_impl` foreign item to its implementation.
|
||||
// The implementation is provided by the function with the `#[panic_handler]` attribute.
|
||||
"panic_impl" => {
|
||||
let panic_impl_id = this.tcx.lang_items().panic_impl().unwrap();
|
||||
let panic_impl_instance = ty::Instance::mono(*this.tcx, panic_impl_id);
|
||||
return Ok(Some(this.load_mir(panic_impl_instance.def, None)?.body()));
|
||||
return Ok(Some(&*this.load_mir(panic_impl_instance.def, None)?));
|
||||
}
|
||||
|
||||
"exit" | "ExitProcess" => {
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
|
|||
}
|
||||
|
||||
// Otherwise, load the MIR.
|
||||
Ok(Some(this.load_mir(instance.def, None)?.body()))
|
||||
Ok(Some(&*this.load_mir(instance.def, None)?))
|
||||
}
|
||||
|
||||
fn align_offset(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue