2018-07-15 16:11:54 -05:00
|
|
|
error[E0034]: multiple applicable items in scope
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/issue-3702-2.rs:16:14
|
2018-07-15 16:11:54 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | self.to_int() + other.to_int()
|
2018-07-15 16:11:54 -05:00
|
|
|
| ^^^^^^ multiple `to_int` found
|
|
|
|
|
|
|
|
|
note: candidate #1 is defined in an impl of the trait `ToPrimitive` for the type `isize`
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/issue-3702-2.rs:2:5
|
2018-07-15 16:11:54 -05:00
|
|
|
|
|
|
|
|
LL | fn to_int(&self) -> isize { 0 }
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
note: candidate #2 is defined in an impl of the trait `Add` for the type `isize`
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/issue-3702-2.rs:14:5
|
2018-07-15 16:11:54 -05:00
|
|
|
|
|
|
|
|
LL | fn to_int(&self) -> isize { *self }
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
2023-02-21 15:11:08 -06:00
|
|
|
help: disambiguate the method for candidate #1
|
2019-12-04 00:19:18 -06:00
|
|
|
|
|
|
|
|
LL | ToPrimitive::to_int(&self) + other.to_int()
|
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
|
|
|
|
|
|
|
|
LL | Add::to_int(&self) + other.to_int()
|
2021-06-21 21:07:19 -05:00
|
|
|
| ~~~~~~~~~~~~~~~~~~
|
2018-07-15 16:11:54 -05:00
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0034`.
|