]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/type-alias-impl-trait/generic_type_does_not_live_long_enough.rs
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
8 let x
= wrong_generic(&y
);
9 let z
: i32 = x
; //~ ERROR mismatched types
12 type WrongGeneric
<T
> = impl '
static;
13 //~^ ERROR the parameter type `T` may not live long enough
14 //~| ERROR: at least one trait must be specified
16 fn wrong_generic
<T
>(t
: T
) -> WrongGeneric
<T
> {