//! This test checks that we don't follow up //! with type mismatch errors of opaque types //! with their hidden types if we failed the //! defining scope check at the signature level. #![feature(impl_trait_in_assoc_type)] trait Foo { type Bar; type Baz; fn foo() -> (Self::Bar, Self::Baz); } impl Foo for () { type Bar = impl Sized; type Baz = impl Sized; fn foo() -> (Self::Bar, Self::Baz) { //~^ ERROR non-defining opaque type use ((), ()) } } fn main() {}