Skip to content
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

Merged
merged 1 commit into from
Dec 26, 2023

Conversation

sjwang05
Copy link
Contributor

Fixes #40660
Fixes #44695

@rustbot
Copy link
Collaborator

rustbot commented Nov 29, 2023

r? @cjgillot

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Nov 29, 2023
@rustbot
Copy link
Collaborator

rustbot commented Nov 29, 2023

These commits modify the Cargo.lock file. Unintentional changes to Cargo.lock can be introduced when switching branches and rebasing PRs.

If this was unintentional then you should revert the changes before this PR is merged.
Otherwise, you can ignore this comment.

@rustbot
Copy link
Collaborator

rustbot commented Nov 29, 2023

These commits modify the Cargo.lock file. Unintentional changes to Cargo.lock can be introduced when switching branches and rebasing PRs.

If this was unintentional then you should revert the changes before this PR is merged.
Otherwise, you can ignore this comment.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@sjwang05

This comment was marked as outdated.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@sjwang05

This comment was marked as outdated.

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 30, 2023
@sjwang05
Copy link
Contributor Author

Fixed the ICE by checking for empty spans before emitting the suggestion--looks like debug assertions were required to reproduce it.

@rustbot review

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Nov 30, 2023
@cjgillot
Copy link
Contributor

cjgillot commented Dec 3, 2023

@estebank do you mind taking this review?

@estebank
Copy link
Contributor

estebank commented Dec 5, 2023

r? @estebank

@rustbot rustbot assigned estebank and unassigned cjgillot Dec 5, 2023
@bors
Copy link
Contributor

bors commented Dec 13, 2023

☔ The latest upstream changes (presumably #118500) made this pull request unmergeable. Please resolve the merge conflicts.

@rust-log-analyzer

This comment has been minimized.

Comment on lines +273 to +277
help: consider annotating `Foo` with `#[derive(PartialEq)]`
|
LL + #[derive(PartialEq)]
LL | struct Foo;
|
Copy link
Contributor

@estebank estebank Dec 26, 2023

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.

Copy link
Contributor

@estebank estebank Dec 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed at #119362

@estebank
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Dec 26, 2023

📌 Commit 2618e0f has been approved by estebank

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 26, 2023
@bors
Copy link
Contributor

bors commented Dec 26, 2023

⌛ Testing commit 2618e0f with merge 2df6406...

@bors
Copy link
Contributor

bors commented Dec 26, 2023

☀️ Test successful - checks-actions
Approved by: estebank
Pushing 2df6406 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Dec 26, 2023
@bors bors merged commit 2df6406 into rust-lang:master Dec 26, 2023
12 checks passed
@rustbot rustbot added this to the 1.77.0 milestone Dec 26, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (2df6406): comparison URL.

Overall result: ❌ regressions - ACTION NEEDED

Next Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please open an issue or create a new PR that fixes the regressions, add a comment linking to the newly created issue or PR, and then add the perf-regression-triaged label to this PR.

@rustbot label: +perf-regression
cc @rust-lang/wg-compiler-performance

Warning ⚠: The following benchmark(s) failed to build:

  • stm32f4-0.14.0

cc @rust-lang/wg-compiler-performance

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
24.0% [18.1%, 29.5%] 3
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 24.0% [18.1%, 29.5%] 3

Max RSS (memory usage)

Results

This 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.

mean range count
Regressions ❌
(primary)
2.9% [2.9%, 2.9%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-2.7% [-2.7%, -2.7%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.1% [-2.7%, 2.9%] 2

Cycles

Results

This 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.

mean range count
Regressions ❌
(primary)
18.5% [15.5%, 23.7%] 3
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 18.5% [15.5%, 23.7%] 3

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 670.702s -> 669.634s (-0.16%)
Artifact size: 312.43 MiB -> 312.43 MiB (0.00%)

@rustbot rustbot added the perf-regression Performance regression. label Dec 27, 2023
@lqd
Copy link
Member

lqd commented Dec 27, 2023

Most likely the slow S3 uploads issue on the collector, not a real perf regression.

@estebank
Copy link
Contributor

estebank commented Dec 27, 2023

@lqd thank goodness, I almost had a heart attack. I see a corresponding "improvement" in #119328 (comment)

@Kobzol
Copy link
Contributor

Kobzol commented Dec 27, 2023

Probably caused by slow S3 uploads.

@rustbot label: +perf-regression-triaged

@rustbot rustbot added the perf-regression-triaged The performance regression has been triaged. label Dec 27, 2023
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 {
Copy link
Member

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. perf-regression Performance regression. perf-regression-triaged The performance regression has been triaged. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ergonomics: &String does not implement PartialEq<str> Better error messages for &T == T
10 participants