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

Suggest both of immutable and mutable trait implementations #89263

Conversation

TaKO8Ki
Copy link
Member

@TaKO8Ki TaKO8Ki commented Sep 26, 2021

closes #85865

@rust-highfive
Copy link
Collaborator

r? @estebank

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 26, 2021
@TaKO8Ki TaKO8Ki force-pushed the suggest-both-immutable-and-mutable-trait-implementations branch from 2dd6d88 to e2aad3f Compare September 26, 2021 07:44
@TaKO8Ki TaKO8Ki changed the title Suggest borrowing immutable or mutable trait implementations Suggest both of immutable and mutable trait implementations Sep 26, 2021
Copy link
Contributor

@estebank estebank left a comment

Choose a reason for hiding this comment

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

The changes look good, just left a couple of nitpicks.

@rust-log-analyzer

This comment has been minimized.

@estebank
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Sep 26, 2021

📌 Commit 3bab363 has been approved by estebank

@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 Sep 26, 2021
@bors
Copy link
Contributor

bors commented Sep 27, 2021

⌛ Testing commit 3bab363 with merge 3e8f32e...

@bors
Copy link
Contributor

bors commented Sep 27, 2021

☀️ Test successful - checks-actions
Approved by: estebank
Pushing 3e8f32e to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Sep 27, 2021
@bors bors merged commit 3e8f32e into rust-lang:master Sep 27, 2021
@rustbot rustbot added this to the 1.57.0 milestone Sep 27, 2021
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (3e8f32e): comparison url.

Summary: This change led to large relevant regressions 😿 in compiler performance.

  • Large regression in instruction counts (up to 2.0% on full builds of diesel)

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

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

@rustbot rustbot added the perf-regression Performance regression. label Sep 27, 2021
@rylev
Copy link
Member

rylev commented Sep 28, 2021

@TaKO8Ki @estebank The regression occurs in evaluate_obligation which seems like it would be effected by this change, but the only impacted benchmark is diesel doc which doesn't trigger this diagnostic, so I'm not sure I see where this regression could be coming from. The change is large enough though that it being noise would be quite surprising. cc @jyn514

@jyn514
Copy link
Member

jyn514 commented Sep 28, 2021

I don't know when suggest_add_reference_to_arg is called, but rustdoc does make a lot more calls to evaluate_obligation than rustc because it's trying to collect an exhaustive list of blanket impls.

@jyn514
Copy link
Member

jyn514 commented Sep 28, 2021

Maybe LLVM is making different inlining decisions or something?

@estebank
Copy link
Contributor

@rylev @jyn514 this is as surprising to me as it is to you :-/

@TaKO8Ki TaKO8Ki deleted the suggest-both-immutable-and-mutable-trait-implementations branch October 31, 2021 13:36
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. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Suggest borrowing if a trait implementation is found for &/&mut <type> regression
9 participants