-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Condition handlers can unsoundly alias mutable stack variables #6459
Comments
Although similar, I think |
The real problem here is the problem described in this blog post. (#2202) |
In particular, if we implemented the plan I had in mind, the variable would be "claimed" by both of the closures, leading to errors. This is a bit unfortunate, though, since in fact the code is probably safe. |
Thinking about this a bit more, I imagine we could distinguish fairly easily between variables that are borrowed (e.g., |
visiting for triage. nominating for backwards compat. |
Inherits from metabug. De-nominating |
…-matches!, r=llogiq 6459: Check for redundant `matches!` with `Ready`, `Pending`, `V4`, `V6` Fixes rust-lang#6459. ``` changelog: [`redundant_pattern_matching`]: Add checks for `Poll::{Ready,Pending}` and `IpAddr::{V4,V6}` in `matches!` ```
In this example,
keep_reading
is mutable and aliased.The text was updated successfully, but these errors were encountered: