Support allocation failures when interperting MIR
Note that this breaks Miri. Closes #79601
This commit is contained in:
parent
6e0b554619
commit
524e575bb4
19 changed files with 103 additions and 39 deletions
|
@ -48,7 +48,7 @@ fn eval_body_using_ecx<'mir, 'tcx>(
|
|||
);
|
||||
let layout = ecx.layout_of(body.return_ty().subst(tcx, cid.instance.substs))?;
|
||||
assert!(!layout.is_unsized());
|
||||
let ret = ecx.allocate(layout, MemoryKind::Stack);
|
||||
let ret = ecx.allocate(layout, MemoryKind::Stack)?;
|
||||
|
||||
let name =
|
||||
with_no_trimmed_paths(|| ty::tls::with(|tcx| tcx.def_path_str(cid.instance.def_id())));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue