From: bors Date: Fri, 13 Jul 2018 17:08:39 +0000 (+0000) Subject: Auto merge of #52242 - ashtneoi:suggest-ref-mut, r=pnkfelix X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=fe29a4cda59ee60c6fbfa8a52429b27a596aaa6d;p=rust.git Auto merge of #52242 - ashtneoi:suggest-ref-mut, r=pnkfelix 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.) --- fe29a4cda59ee60c6fbfa8a52429b27a596aaa6d