1 //! Tests that we cannot produce a generator that accepts a resume argument
2 //! with any lifetime and then stores it across a `yield`.
4 #![feature(generators, generator_trait)]
6 use std::ops::Generator;
8 fn test(a: impl for<'a> Generator<&'a mut bool>) {}
11 let gen = |arg: &mut bool| {
16 //~^ ERROR mismatched types