-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better diagnostic for binary operation on BoxedValues #59467
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @estebank (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple of minor nitpicks, but otherwise r=me
@@ -3,6 +3,9 @@ error[E0369]: binary operation `==` cannot be applied to type `Error` | |||
| | |||
LL | Error | |||
| ^^^^^ | |||
| | | |||
| Error | |||
| Error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a check for the case when both left and right overlap to avoid this output?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fixed
src/test/ui/span/issue-39018.stderr
Outdated
| | | | ||
| | &str | ||
| &str | ||
| `+` can't be used to concatenate two `&str` strings |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you change the span for the explanation to use the span pointing at the operator?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is fixed? Not sure if issue-47380.stderr
looks right though
…tion to point at operator
@bors r+ rollup |
📌 Commit 4644c3a has been approved by |
…bank Better diagnostic for binary operation on BoxedValues Fixes rust-lang#59458
Rollup of 9 pull requests Successful merges: - #59366 (Update books) - #59436 (Update jemalloc-sys to version 0.3.0) - #59454 (Update rustfmt to 1.2.0) - #59462 (Fix error in Rust 2018 + no_core environment) - #59467 (Better diagnostic for binary operation on BoxedValues) - #59473 (Do not emit incorrect borrow suggestion involving macros and fix overlapping multiline spans) - #59480 (Update stdsimd) - #59486 (Visit `ImplItem` in `dead_code` lint) - #59510 (Rename `type_parameters` to `generics` and so on) Failed merges: - #59516 (Update cargo) r? @ghost
Rollup of 9 pull requests Successful merges: - #59366 (Update books) - #59436 (Update jemalloc-sys to version 0.3.0) - #59454 (Update rustfmt to 1.2.0) - #59462 (Fix error in Rust 2018 + no_core environment) - #59467 (Better diagnostic for binary operation on BoxedValues) - #59473 (Do not emit incorrect borrow suggestion involving macros and fix overlapping multiline spans) - #59480 (Update stdsimd) - #59486 (Visit `ImplItem` in `dead_code` lint) - #59510 (Rename `type_parameters` to `generics` and so on) Failed merges: - #59516 (Update cargo) r? @ghost
Fixes #59458