mirror of
https://github.com/rust-lang/rust.git
synced 2026-06-02 06:28:20 +03:00
Remove unnecessary Result return in push_stack_frame.
This commit is contained in:
+3
-7
@@ -162,9 +162,7 @@ fn print_trace<T: Debug>(t: &T, suffix: &'static str, indent: usize) {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn push_stack_frame(&mut self, mir: CachedMir<'a, 'tcx>, return_ptr: Option<Pointer>)
|
||||
-> EvalResult<()>
|
||||
{
|
||||
fn push_stack_frame(&mut self, mir: CachedMir<'a, 'tcx>, return_ptr: Option<Pointer>) {
|
||||
let arg_tys = mir.arg_decls.iter().map(|a| a.ty);
|
||||
let var_tys = mir.var_decls.iter().map(|v| v.ty);
|
||||
let temp_tys = mir.temp_decls.iter().map(|t| t.ty);
|
||||
@@ -185,8 +183,6 @@ fn push_stack_frame(&mut self, mir: CachedMir<'a, 'tcx>, return_ptr: Option<Poin
|
||||
var_offset: num_args,
|
||||
temp_offset: num_args + num_vars,
|
||||
});
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn pop_stack_frame(&mut self) {
|
||||
@@ -310,7 +306,7 @@ fn eval_terminator(&mut self, terminator: &mir::Terminator<'tcx>)
|
||||
|
||||
let mir = self.load_mir(def_id);
|
||||
self.substs_stack.push(substs);
|
||||
try!(self.push_stack_frame(mir, return_ptr));
|
||||
self.push_stack_frame(mir, return_ptr);
|
||||
|
||||
for (i, (src, size)) in arg_srcs.into_iter().enumerate() {
|
||||
let dest = self.frame().locals[i];
|
||||
@@ -1149,7 +1145,7 @@ fn print_allocation_tree(memory: &Memory, alloc_id: memory::AllocId) {
|
||||
}
|
||||
ty::FnDiverging => None,
|
||||
};
|
||||
miri.push_stack_frame(CachedMir::Ref(mir), return_ptr).unwrap();
|
||||
miri.push_stack_frame(CachedMir::Ref(mir), return_ptr);
|
||||
miri.run().unwrap();
|
||||
|
||||
if let Some(ret) = return_ptr {
|
||||
|
||||
Reference in New Issue
Block a user