blob: cdd8f6f1976a5b527cc9120a254ad68720f08d1e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#![feature(type_alias_impl_trait)]
fn main() {
let y = 42;
let x = wrong_generic(&y);
let z: i32 = x;
//~^ ERROR expected generic type parameter, found `&i32`
}
type WrongGeneric<T> = impl 'static;
//~^ ERROR: at least one trait must be specified
fn wrong_generic<T>(t: T) -> WrongGeneric<T> {
t
//~^ ERROR the parameter type `T` may not live long enough
}
|