Closed
Description
The following two errors are actually the same problem but have different output because they are handled in different parts of the compiler. We should unify the output to have similar, if not the same, text.
error[E0277]: cannot add `std::option::Option<i8>` to `i8`
--> src/main.rs:5:13
|
5 | let sum = x + y;
| ^ no implementation for `i8 + std::option::Option<i8>`
|
= help: the trait `std::ops::Add<std::option::Option<i8>>` is not implemented for `i8`
error[E0369]: binary operation `+` cannot be applied to type `std::option::Option<i8>`
--> src/main.rs:5:13
|
5 | let sum = y + x;
| - ^ - i8
| |
| std::option::Option<i8>
|
= note: an implementation of `std::ops::Add` might be missing for `std::option::Option<i8>`
This issue has been assigned to @LeSeulArtichaut via this comment.
Metadata
Metadata
Assignees
Labels
Area: Messages for errors, warnings, and lintsCategory: An issue proposing an enhancement or a PR with one.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Error messages that can be tackled with `#[rustc_on_unimplemented]`Relevant to the compiler team, which will review and decide on the PR/issue.