blob: 5297d0d9842e28835b5da3be1a2fc913a8925fbb [file] [log] [blame]
/*
* We don't infer `T: 'static` outlives relationships by default.
* Instead an additional feature gate `infer_static_outlives_requirements`
* is required.
*/
struct Foo<U> {
bar: Bar<U> //~ ERROR the parameter type `U` may not live long enough [E0310]
}
struct Bar<T: 'static> {
x: T,
}
fn main() {}