2019-03-15 21:55:04 +00:00
|
|
|
error[E0034]: multiple applicable items in scope
|
2021-02-08 22:15:45 +00:00
|
|
|
--> $DIR/ambiguous.rs:21:7
|
2019-03-15 21:55:04 +00:00
|
|
|
|
|
|
|
|
LL | t.foo();
|
|
|
|
| ^^^ multiple `foo` found
|
|
|
|
|
|
2020-09-02 07:40:56 +00:00
|
|
|
note: candidate #1 is defined in an impl of the trait `A` for the type `u8`
|
2021-02-08 22:15:45 +00:00
|
|
|
--> $DIR/ambiguous.rs:8:9
|
2019-03-15 21:55:04 +00:00
|
|
|
|
|
|
|
|
LL | fn foo(&self) {}
|
|
|
|
| ^^^^^^^^^^^^^
|
2020-09-02 07:40:56 +00:00
|
|
|
note: candidate #2 is defined in an impl of the trait `B` for the type `u8`
|
2021-02-08 22:15:45 +00:00
|
|
|
--> $DIR/ambiguous.rs:11:9
|
2019-03-15 21:55:04 +00:00
|
|
|
|
|
|
|
|
LL | fn foo(&self) {}
|
|
|
|
| ^^^^^^^^^^^^^
|
2020-04-01 02:09:50 +00:00
|
|
|
help: disambiguate the associated function for candidate #1
|
2019-12-04 06:19:18 +00:00
|
|
|
|
|
2020-09-02 07:40:56 +00:00
|
|
|
LL | A::foo(&t);
|
2021-06-22 02:07:19 +00:00
|
|
|
| ~~~~~~~~~~
|
2020-04-01 02:09:50 +00:00
|
|
|
help: disambiguate the associated function for candidate #2
|
2019-12-04 06:19:18 +00:00
|
|
|
|
|
2020-09-02 07:40:56 +00:00
|
|
|
LL | B::foo(&t);
|
2021-06-22 02:07:19 +00:00
|
|
|
| ~~~~~~~~~~
|
2019-03-15 21:55:04 +00:00
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0034`.
|