]> git.lizzy.rs Git - rust.git/blob - src/test/ui/feature-gates/feature-gate-infer_static_outlives_requirements.rs
Rollup merge of #94271 - RalfJung:downcast, r=oli-obk
[rust.git] / src / test / ui / feature-gates / feature-gate-infer_static_outlives_requirements.rs
1 // Needs an explicit where clause stating outlives condition. (RFC 2093)
2
3 // Type T needs to outlive lifetime 'static.
4 struct Foo<U> {
5     bar: Bar<U> //~ ERROR the parameter type `U` may not live long enough [E0310]
6 }
7 struct Bar<T: 'static> {
8     x: T,
9 }
10
11
12 fn main() { }