-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Emit better suggestions for &T == T
and T == &T
#118431
Conversation
r? @cjgillot (rustbot has picked a reviewer for you, use r? to override) |
These commits modify the If this was unintentional then you should revert the changes before this PR is merged. |
4275e80
to
6f25d87
Compare
These commits modify the If this was unintentional then you should revert the changes before this PR is merged. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment was marked as outdated.
This comment was marked as outdated.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment was marked as outdated.
This comment was marked as outdated.
89080c1
to
32d7890
Compare
Fixed the ICE by checking for empty spans before emitting the suggestion--looks like debug assertions were required to reproduce it. @rustbot review |
@estebank do you mind taking this review? |
compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs
Outdated
Show resolved
Hide resolved
r? @estebank |
☔ The latest upstream changes (presumably #118500) made this pull request unmergeable. Please resolve the merge conflicts. |
1091774
to
21ea886
Compare
This comment has been minimized.
This comment has been minimized.
21ea886
to
2b88d14
Compare
2b88d14
to
2618e0f
Compare
help: consider annotating `Foo` with `#[derive(PartialEq)]` | ||
| | ||
LL + #[derive(PartialEq)] | ||
LL | struct Foo; | ||
| |
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.
We should filter this suggestion to only show up in the case where both arms are (after peel_refs()
) Foo
.
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.
Addressed at #119362
@bors r+ |
☀️ Test successful - checks-actions |
Finished benchmarking commit (2df6406): comparison URL. Overall result: ❌ regressions - ACTION NEEDEDNext Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression Warning ⚠: The following benchmark(s) failed to build:
cc @rust-lang/wg-compiler-performance Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 670.702s -> 669.634s (-0.16%) |
Most likely the slow S3 uploads issue on the collector, not a real perf regression. |
@lqd thank goodness, I almost had a heart attack. I see a corresponding "improvement" in #119328 (comment) |
Probably caused by slow S3 uploads. @rustbot label: +perf-regression-triaged |
let mut base_trait_pred = None; | ||
while let Some((parent_code, parent_pred)) = base_cause.parent() { | ||
base_cause = parent_code; | ||
if let Some(parent_pred) = parent_pred { |
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 will return predicates that don't actually line up with the derived cause if parent_pred
is None
. This is partly why #119352 is failing.
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.
Fixes #40660
Fixes #44695