rust/tests/ui/issues/issue-3702-2.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

29 lines
976 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 `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 }
| ^^^^^^^^^^^^^^^^^^^^^^^^^
note: candidate #2 is defined in an impl of the trait `ToPrimitive` for the type `isize`
--> $DIR/issue-3702-2.rs:2:5
|
LL | fn to_int(&self) -> isize { 0 }
| ^^^^^^^^^^^^^^^^^^^^^^^^^
help: disambiguate the method for candidate #1
|
LL | Add::to_int(&self) + other.to_int()
| ~~~~~~~~~~~~~~~~~~
help: disambiguate the method for candidate #2
|
LL | ToPrimitive::to_int(&self) + other.to_int()
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
2018-07-15 21:11:54 +00:00
error: aborting due to 1 previous error
2018-07-15 21:11:54 +00:00
For more information about this error, try `rustc --explain E0034`.