blob: 2f4a7052f72212868d6f35925ce608a002e8caae (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
//! 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<T>;
fn foo() -> Self::Bar<u32>;
fn bar<T>() -> Self::Bar<T>;
}
impl Foo for () {
type Bar<T> = impl Sized;
fn foo() -> Self::Bar<u32> {}
//~^ ERROR non-defining opaque type use
fn bar<T>() -> Self::Bar<T> {}
}
fn main() {}
|