]> git.proxmox.com Git - rustc.git/blame - src/test/ui/type-alias-impl-trait/generic_type_does_not_live_long_enough.rs
Update unsuspicious file list
[rustc.git] / src / test / ui / type-alias-impl-trait / generic_type_does_not_live_long_enough.rs
CommitLineData
94222f64 1#![feature(type_alias_impl_trait)]
0531ce1d 2
a7813a04 3fn 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 10type WrongGeneric<T> = impl 'static;
94222f64 11//~^ ERROR: at least one trait must be specified
0531ce1d 12
8faf50e0
XL
13fn wrong_generic<T>(t: T) -> WrongGeneric<T> {
14 t
5e7ed085 15 //~^ ERROR the parameter type `T` may not live long enough
54a0048b 16}