// Check that we enforce WF conditions also for types in fns. #![allow(dead_code)] trait Object { } struct MustBeCopy { t: T } struct Foo { // needs T: 'static x: dyn Object<&'static T> //~ ERROR E0310 } fn main() { }