2 #![allow(unused_unsafe)]
4 #![feature(generators)]
8 static move || { //~ WARN unused generator that must be used
9 // Tests that the generator transformation finds out that `a` is not live
10 // during the yield expression. Type checking will also compute liveness
11 // and it should also find out that `a` is not live.
12 // The compiler will panic if the generator transformation finds that
13 // `a` is live and type checking finds it dead.