fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #69854 - pietroalbini:stable-next, r=Centrilb8cedc00407

1.42.0
1.9 KiB78 linesraw
1error[E0034]: multiple applicable items in scope
2  --> $DIR/issue-37767.rs:10:7
3   |
4LL |     a.foo()
5   |       ^^^ multiple `foo` found
6   |
7note: candidate #1 is defined in the trait `A`
8  --> $DIR/issue-37767.rs:2:5
9   |
10LL |     fn foo(&mut self) {}
11   |     ^^^^^^^^^^^^^^^^^
12note: candidate #2 is defined in the trait `B`
13  --> $DIR/issue-37767.rs:6:5
14   |
15LL |     fn foo(&mut self) {}
16   |     ^^^^^^^^^^^^^^^^^
17help: disambiguate the method call for candidate #1
18   |
19LL |     A::foo(&a)
20   |     ^^^^^^^^^^
21help: disambiguate the method call for candidate #2
22   |
23LL |     B::foo(&a)
24   |     ^^^^^^^^^^
25
26error[E0034]: multiple applicable items in scope
27  --> $DIR/issue-37767.rs:22:7
28   |
29LL |     a.foo()
30   |       ^^^ multiple `foo` found
31   |
32note: candidate #1 is defined in the trait `C`
33  --> $DIR/issue-37767.rs:14:5
34   |
35LL |     fn foo(&self) {}
36   |     ^^^^^^^^^^^^^
37note: candidate #2 is defined in the trait `D`
38  --> $DIR/issue-37767.rs:18:5
39   |
40LL |     fn foo(&self) {}
41   |     ^^^^^^^^^^^^^
42help: disambiguate the method call for candidate #1
43   |
44LL |     C::foo(&a)
45   |     ^^^^^^^^^^
46help: disambiguate the method call for candidate #2
47   |
48LL |     D::foo(&a)
49   |     ^^^^^^^^^^
50
51error[E0034]: multiple applicable items in scope
52  --> $DIR/issue-37767.rs:34:7
53   |
54LL |     a.foo()
55   |       ^^^ multiple `foo` found
56   |
57note: candidate #1 is defined in the trait `E`
58  --> $DIR/issue-37767.rs:26:5
59   |
60LL |     fn foo(self) {}
61   |     ^^^^^^^^^^^^
62note: candidate #2 is defined in the trait `F`
63  --> $DIR/issue-37767.rs:30:5
64   |
65LL |     fn foo(self) {}
66   |     ^^^^^^^^^^^^
67help: disambiguate the method call for candidate #1
68   |
69LL |     E::foo(a)
70   |     ^^^^^^^^^
71help: disambiguate the method call for candidate #2
72   |
73LL |     F::foo(a)
74   |     ^^^^^^^^^
75
76error: aborting due to 3 previous errors
77
78For more information about this error, try `rustc --explain E0034`.