auto merge of #12366 :...
auto merge of #12366 : aepsil0n/rust/feature/unnecessary_parens_around_assigned_values, r=alexcrichton Fixes #12350. Parentheses around assignment statements such as ```rust let mut a = (0); a = (1); a += (2); ``` are not necessary and therefore an unnecessary_parens warning is raised when statements like this occur. NOTE: In `let` declarations this does not work as intended. Is it possible that they do not count as assignment expressions (`ExprAssign`)? (edit: this is fixed by now) Furthermore, there are some cases that I fixed in the rest of the code, where parentheses could potentially enhance readability. Compare these lines: ```rust a = b == c; a = (b == c); ``` Thus, after having worked on this I'm not entirely sure, whether we should go through with this patch or not. Probably a matter of debate. ;)
Showing
想要评论请 注册 或 登录