You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NLL: Suggest `ref mut` and `&mut self`
Fixesrust-lang#51244. Supersedes rust-lang#51249, I think.
Under the old lexical lifetimes, the compiler provided helpful suggestions about adding `mut` when you tried to mutate a variable bound as `&self` or (explicit) `ref`. NLL doesn't have those suggestions yet. This pull request adds them.
I didn't bother making the help text exactly the same as without NLL, but I can if that's important.
(Originally this was supposed to be part of rust-lang#51612, but I got bogged down trying to fit everything in one PR.)
NLL: Suggest `ref mut` and `&mut self`
Fixes#51244. Supersedes #51249, I think.
Under the old lexical lifetimes, the compiler provided helpful suggestions about adding `mut` when you tried to mutate a variable bound as `&self` or (explicit) `ref`. NLL doesn't have those suggestions yet. This pull request adds them.
I didn't bother making the help text exactly the same as without NLL, but I can if that's important.
(Originally this was supposed to be part of #51612, but I got bogged down trying to fit everything in one PR.)
The following snippet:
Produces the following output:
Note that the label suggests invalid syntax. I believe this happens due to the text replacement in the following code:
rust/src/librustc_borrowck/borrowck/mod.rs
Lines 1210 to 1219 in e38554c
The text was updated successfully, but these errors were encountered: