]> git.lizzy.rs Git - rust.git/commitdiff
Storage{Live,Dead} in generators got fixed
authorRalf Jung <post@ralfj.de>
Fri, 15 Sep 2017 06:58:12 +0000 (08:58 +0200)
committerRalf Jung <post@ralfj.de>
Fri, 15 Sep 2017 06:58:12 +0000 (08:58 +0200)
src/librustc_mir/interpret/eval_context.rs

index 190e3018c7f415656c9a2b044e2519a8cecd1567..780155214a09ff58dd5e8a9e688a657cd072ccfc 100644 (file)
@@ -488,10 +488,7 @@ fn collect_storage_annotations<'tcx>(mir: &'tcx mir::Mir<'tcx>) -> HashSet<mir::
         // `Value` for that.
         let num_locals = mir.local_decls.len() - 1;
 
-        // FIXME: generators produce broken storage annotations (https://github.com/rust-lang/rust/issues/44179)
-        let locals = if mir.generator_layout.is_some() {
-            vec![Some(Value::ByVal(PrimVal::Undef)); num_locals]
-        } else {
+        let locals = {
             let annotated_locals = collect_storage_annotations(mir);
             let mut locals = vec![None; num_locals];
             for i in 0..num_locals {