trait Foo: 'static { } trait Bar: Foo { } fn test1, S>() { } fn test2<'a>() { // Here: the type `dyn Bar<&'a u32>` references `'a`, // and so it does not outlive `'static`. test1::, _>(); //~^ ERROR the type `(dyn Bar<&'a u32> + 'static)` does not fulfill the required lifetime } fn main() { }