-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Mutably capturing in a closure doesn't count as a borrow #11302
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
Milestone
Comments
Accepted for 1.0 P-backcompat-lang. |
With PR #12158 I get:
|
I won't add a test since I think this is case is well covered by the existing tests I added |
Fixed by #12158 |
flip1995
pushed a commit
to flip1995/rust
that referenced
this issue
Sep 25, 2023
[`extra_unused_type_parameters`]: Fix edge case FP for parameters in where bounds Generic parameters can end up being used on the left side of where-bounds if they are not directly bound but instead appear nested in some concrete generic type. Therefore, we should walk the left side of where bounds, but only if the bounded type is *not* a generic param, in which case we still need to ignore the bound. Fixes rust-lang#11302 changelog: [`extra_unused_type_parameters`]: Fix edge case false positive for parameters in where bounds
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The compiler accepts this code when it definitely shouldn't
cc @nikomatsakis
Nominating (although this is probably a dupe of an existing issue).
The text was updated successfully, but these errors were encountered: