]>
Commit | Line | Data |
---|---|---|
6a06907d XL |
1 | // revisions: min_tait full_tait |
2 | #![feature(min_type_alias_impl_trait)] | |
3 | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] | |
4 | //[full_tait]~^ WARN incomplete | |
0531ce1d | 5 | |
a7813a04 | 6 | fn main() { |
8faf50e0 XL |
7 | let y = 42; |
8 | let x = wrong_generic(&y); | |
9 | let z: i32 = x; //~ ERROR mismatched types | |
10 | } | |
0531ce1d | 11 | |
416331ca | 12 | type WrongGeneric<T> = impl 'static; |
8faf50e0 | 13 | //~^ ERROR the parameter type `T` may not live long enough |
29967ef6 | 14 | //~| ERROR: at least one trait must be specified |
0531ce1d | 15 | |
8faf50e0 XL |
16 | fn wrong_generic<T>(t: T) -> WrongGeneric<T> { |
17 | t | |
54a0048b | 18 | } |