mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-31 05:26:23 +03:00
rustup
This commit is contained in:
+1
-1
@@ -1 +1 @@
|
||||
5c5c8eb864e56ce905742b8e97df5506bba6aeef
|
||||
e862c01aadb2d029864f7bb256cf6c85bbb5d7e4
|
||||
|
||||
+1
-1
@@ -131,7 +131,7 @@ fn call_function(
|
||||
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 @@ fn emulate_foreign_item(
|
||||
.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" => {
|
||||
|
||||
+1
-1
@@ -49,7 +49,7 @@ fn find_mir_or_eval_fn(
|
||||
}
|
||||
|
||||
// Otherwise, load the MIR.
|
||||
Ok(Some(this.load_mir(instance.def, None)?.body()))
|
||||
Ok(Some(&*this.load_mir(instance.def, None)?))
|
||||
}
|
||||
|
||||
fn align_offset(
|
||||
|
||||
Reference in New Issue
Block a user