rust/src/test/ui/issues/issue-3702-2.stderr

29 lines
984 B
Plaintext
Raw Normal View History

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