blob: 7452000b65dc8c02dc0fc13f46178b339657fb1f [file] [log] [blame]
#![feature(impl_trait_in_assoc_type)]
trait Foo {
type Assoc<'a>;
fn bar<'a: 'a>();
}
impl Foo for () {
type Assoc<'a> = impl Sized; //~ ERROR unconstrained opaque type
fn bar<'a: 'a>()
where
Self::Assoc<'a>:,
{
let _ = |x: &'a ()| {
let _: Self::Assoc<'a> = x;
//~^ ERROR `<() as Foo>::Assoc<'a>` captures lifetime that does not appear in bound
};
}
}
fn main() {}