]>
Commit | Line | Data |
---|---|---|
94222f64 | 1 | #![feature(type_alias_impl_trait)] |
0531ce1d | 2 | |
a7813a04 | 3 | fn main() { |
8faf50e0 XL |
4 | let y = 42; |
5 | let x = wrong_generic(&y); | |
5e7ed085 FG |
6 | let z: i32 = x; |
7 | //~^ ERROR non-defining opaque type use | |
8faf50e0 | 8 | } |
0531ce1d | 9 | |
416331ca | 10 | type WrongGeneric<T> = impl 'static; |
94222f64 | 11 | //~^ ERROR: at least one trait must be specified |
0531ce1d | 12 | |
8faf50e0 XL |
13 | fn wrong_generic<T>(t: T) -> WrongGeneric<T> { |
14 | t | |
5e7ed085 | 15 | //~^ ERROR the parameter type `T` may not live long enough |
54a0048b | 16 | } |