summary refs log tree commit diff
path: root/src/test/ui/feature-gates/feature-gate-infer_static_outlives_requirements.rs
blob: 65792a74ea4d584e4301aec66f983b44a2b0614f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// Needs an explicit where clause stating outlives condition. (RFC 2093)

// Type T needs to outlive lifetime 'static.
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() { }