blob: 9c9cef24a96566a0cc59a9063c668a00a5af8e00 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
// issue#143560
trait T {
type Target;
}
trait Foo {
fn foo() -> impl T<Target = impl T<Target = impl Sized>>;
fn foo() -> impl Sized;
//~^ ERROR: the name `foo` is defined multiple times
}
trait Bar {
fn foo() -> impl T<Target = impl T<Target = impl Sized>>;
fn foo() -> impl T<Target = impl T<Target = impl Sized>>;
//~^ ERROR: the name `foo` is defined multiple times
}
struct S<T> {
a: T
}
trait Baz {
fn foo() -> S<impl T<Target = S<S<impl Sized>>>>;
fn foo() -> S<impl T<Target = S<S<impl Sized>>>>;
//~^ ERROR: the name `foo` is defined multiple times
}
struct S1<T1, T2> {
a: T1,
b: T2
}
trait Qux {
fn foo() -> S1<
impl T<Target = impl T<Target = impl Sized>>,
impl T<Target = impl T<Target = S<impl Sized>>>
>;
fn foo() -> S1<
impl T<Target = impl T<Target = impl Sized>>,
impl T<Target = impl T<Target = S<impl Sized>>>
>;
//~^^^^ ERROR: the name `foo` is defined multiple times
}
trait T0<T> {
type Target;
}
trait T1<T> {}
trait X {
fn a() -> impl T0<(), Target = impl T1<()>>;
fn a() -> impl T0<(), Target = impl T1<()>>;
//~^ ERROR the name `a` is defined multiple times
fn a() -> impl T0<(), Target = impl T1<()>>;
//~^ ERROR the name `a` is defined multiple times
}
fn main() {}
|