1 error[E0308]: mismatched types
2 --> $DIR/generic_type_does_not_live_long_enough.rs:16:18
4 LL | let z: i32 = x; //~ ERROR mismatched types
5 | ^ expected i32, found opaque type
7 = note: expected type `i32`
8 found type `WrongGeneric::<&{integer}>`
10 error[E0310]: the parameter type `T` may not live long enough
11 --> $DIR/generic_type_does_not_live_long_enough.rs:19:1
13 LL | existential type WrongGeneric<T>: 'static;
14 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
16 LL | fn wrong_generic<T>(t: T) -> WrongGeneric<T> {
17 | - help: consider adding an explicit lifetime bound `T: 'static`...
19 note: ...so that the type `T` will meet its required lifetime bounds
20 --> $DIR/generic_type_does_not_live_long_enough.rs:19:1
22 LL | existential type WrongGeneric<T>: 'static;
23 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
25 error: aborting due to 2 previous errors
27 Some errors occurred: E0308, E0310.
28 For more information about an error, try `rustc --explain E0308`.