rust/tests/ui/type-alias-impl-trait/hkl_forbidden3.rs

14 lines
215 B
Rust

#![feature(type_alias_impl_trait)]
type Opaque<'a> = impl Sized + 'a;
fn foo<'a>(x: &'a ()) -> &'a () {
x
}
fn test() -> for<'a> fn(&'a ()) -> Opaque<'a> {
foo //~ ERROR: mismatched types
}
fn main() {}