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

Correct suggestions for closure arguments that need a borrow #107306

Conversation

compiler-errors
Copy link
Member

Fixes #107301 by dealing with binders correctly
Fixes another issue where we were suggesting adding just & when we expected &mut _ in a closure arg

@rustbot
Copy link
Collaborator

rustbot commented Jan 25, 2023

r? @estebank

(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 Jan 25, 2023
@compiler-errors compiler-errors changed the title Correct sugg for closure arg needs borrow Correct suggestions for closure arguments that need a borrow Jan 25, 2023
Copy link
Contributor

@oli-obk oli-obk left a comment

Choose a reason for hiding this comment

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

r=me with either something done with the binders or commented why not

@oli-obk
Copy link
Contributor

oli-obk commented Jan 26, 2023

r? @oli-obk

@rustbot rustbot assigned oli-obk and unassigned estebank Jan 26, 2023
@oli-obk
Copy link
Contributor

oli-obk commented Jan 26, 2023

@bors r+

@bors
Copy link
Contributor

bors commented Jan 26, 2023

📌 Commit b83ab0c has been approved by oli-obk

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 Jan 26, 2023
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Jan 27, 2023
…losure-arg-needs-borrow, r=oli-obk

Correct suggestions for closure arguments that need a borrow

Fixes rust-lang#107301 by dealing with binders correctly
Fixes another issue where we were suggesting adding just `&` when we expected `&mut _` in a closure arg
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 27, 2023
…losure-arg-needs-borrow, r=oli-obk

Correct suggestions for closure arguments that need a borrow

Fixes rust-lang#107301 by dealing with binders correctly
Fixes another issue where we were suggesting adding just `&` when we expected `&mut _` in a closure arg
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 28, 2023
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#107022 (Implement `SpecOptionPartialEq` for `cmp::Ordering`)
 - rust-lang#107100 (Use proper `InferCtxt` when probing for associated types in astconv)
 - rust-lang#107103 (Use new solver in `evaluate_obligation` query (when new solver is enabled))
 - rust-lang#107190 (Recover from more const arguments that are not wrapped in curly braces)
 - rust-lang#107306 (Correct suggestions for closure arguments that need a borrow)
 - rust-lang#107339 (internally change regions to be covariant)
 - rust-lang#107344 (Minor tweaks in the new solver)
 - rust-lang#107373 (Don't merge vtables when full debuginfo is enabled.)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit fa2cd94 into rust-lang:master Jan 28, 2023
@rustbot rustbot added this to the 1.69.0 milestone Jan 28, 2023
@aliemjay
Copy link
Member

This fixes an error-to-ice regression in 1.68-stable. See #109361. There are dozen issues reported since it hit stable. Probably worth nominating for a stable backport.

@rustbot label stable-nominated

@rustbot rustbot added the stable-nominated Nominated for backporting to the compiler in the stable channel. label Mar 26, 2023
@apiraino
Copy link
Contributor

@aliemjay I assume the stable backport nomination is meant for another 1.68 point release (if it will discussed), correct (next stable 1.69.0 is due in 3 weeks)?

@apiraino
Copy link
Contributor

Stable backport approved as per compiler team on Zulip, though if alone it doesn't warrant a new point release

@rustbot label +stable-accepted

@rustbot rustbot added the stable-accepted Accepted for backporting to the compiler in the stable channel. label Mar 30, 2023
@Mark-Simulacrum Mark-Simulacrum removed the stable-nominated Nominated for backporting to the compiler in the stable channel. label Jul 21, 2023
@compiler-errors compiler-errors deleted the correct-sugg-for-closure-arg-needs-borrow branch August 11, 2023 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. stable-accepted Accepted for backporting to the compiler in the stable channel. 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.

Self-referencing closure paniced the compiler
8 participants