Skip to content

Commit e8ea7da

Browse files
authored
Merge pull request rust-lang#339 from RalfJung/rustup
Storage{Live,Dead} in generators got fixed
2 parents 02e09dc + 9db9308 commit e8ea7da

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/librustc_mir/interpret/eval_context.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -488,10 +488,7 @@ impl<'a, 'tcx, M: Machine<'tcx>> EvalContext<'a, 'tcx, M> {
488488
// `Value` for that.
489489
let num_locals = mir.local_decls.len() - 1;
490490

491-
// FIXME: generators produce broken storage annotations (https://github.com/rust-lang/rust/issues/44179)
492-
let locals = if mir.generator_layout.is_some() {
493-
vec![Some(Value::ByVal(PrimVal::Undef)); num_locals]
494-
} else {
491+
let locals = {
495492
let annotated_locals = collect_storage_annotations(mir);
496493
let mut locals = vec![None; num_locals];
497494
for i in 0..num_locals {

0 commit comments

Comments
 (0)