Merge pull request #339 from RalfJung/rustup

Storage{Live,Dead} in generators got fixed
This commit is contained in:
Oliver Schneider
2017-09-15 09:22:18 +02:00
committed by GitHub
+1 -4
View 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 {