1 #![feature(box_syntax)]
3 // Test for what happens when a type parameter `A` is closed over into
4 // an object. This should yield errors unless `A` (and the object)
5 // both have suitable bounds.
7 trait Foo { fn get(&self); }
13 fn repeater3<'a,A:'a>(v: A) -> Box<dyn Foo + 'a> {
14 box 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