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