1 // Test for what happens when a type parameter `A` is closed over into
2 // an object. This should yield errors unless `A` (and the object)
3 // both have suitable bounds.
5 trait Foo { fn get(&self); }
12 fn repeater3<'a,A:'a>(v: A) -> Box<dyn Foo + 'a> {
13 Box::new(v) as Box<dyn Foo+'a>
18 // Error results because the type of is inferred to be
19 // ~Repeat<&'blk isize> where blk is the lifetime of the block below.
26 //~^^^ ERROR `tmp0` does not live long enough