-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Correct suggestions for closure arguments that need a borrow #107306
Conversation
r? @estebank (rustbot has picked a reviewer for you, use r? to override) |
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.
r=me with either something done with the binders or commented why not
compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs
Show resolved
Hide resolved
r? @oli-obk |
@bors r+ |
…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
…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
…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
@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)? |
Fixes #107301 by dealing with binders correctly
Fixes another issue where we were suggesting adding just
&
when we expected&mut _
in a closure arg