Change:
It doesn't give a warning for the unnecessary parentheses for N1: <!-- TRIAGEBOTSTART --<!-- TRIAGEBOTASSIGNSTART --This issue has been assigned to via . <!-- TRIAGEBOTASSIGNDATASTARTTRIAGEBOTASSIGNDATAEND --<!-- TRIAGEBOTASSIGNEND --<!-- TRIAGEBOTEND --
implemented for to check the .
claim
I've encountered an issue I'm not quite sure how to handle :( After getting what looks like a correct solution up with: I am met with the following after starting to build stage-1: Should I open a separate Issue & PR to deal with any errors generated by unused parens or is it within the scope of this issue (and PR coming soon once I write the UI tests) to deal with them?
should be fixed within this issue, and don' forget to add a testcase named into , then , git add the new and updated if any.
I resolved the issue with the submodule, is it alright if I claim this? It's a small patch to land. claim

Discussion:
} } } <ins> fn check_item(&mut self, cx: &EarlyContext<'_>, item: &ast::Item) { use ast::ItemKind::*; if let Const(.., ref expr) | Static(.., ref expr) = item.kind { self.check_unused_parens_expr(cx, expr, "assigned value", false, None, None); } } </ins> } declare_lint! {

} } <ins> const CONST_ITEM: usize = (10); //~ ERROR unnecessary parentheses around assigned value static STATIC_ITEM: usize = (10); //~ ERROR unnecessary parentheses around assigned value </ins> fn main() { foo(); bar((true)); //~ ERROR unnecessary parentheses around function argument

LL |     (5) |     ^^^ help: remove these parentheses <ins> error: unnecessary parentheses around assigned value --> $DIR/lint-unnecessary-parens.rs:41:27 | LL | const CONST_ITEM: usize = (10); |                           ^^^^ help: remove these parentheses error: unnecessary parentheses around assigned value --> $DIR/lint-unnecessary-parens.rs:42:29 | LL | static STATIC_ITEM: usize = (10); |                             ^^^^ help: remove these parentheses </ins> error: unnecessary parentheses around function argument <del> --> $DIR/lint-unnecessary-parens.rs:43:9 </del> <ins> --> $DIR/lint-unnecessary-parens.rs:46:9 </ins> | LL |     bar((true)); |         ^^^^^^ help: remove these parentheses error: unnecessary parentheses around `if` condition <del> --> $DIR/lint-unnecessary-parens.rs:45:8 </del> <ins> --> $DIR/lint-unnecessary-parens.rs:48:8 </ins> | LL |     if (true) {} |        ^^^^^^ help: remove these parentheses error: unnecessary parentheses around `while` condition <del> --> $DIR/lint-unnecessary-parens.rs:46:11 </del> <ins> --> $DIR/lint-unnecessary-parens.rs:49:11 </ins> | LL |     while (true) {} |           ^^^^^^ help: remove these parentheses warning: denote infinite loops with `loop { ... }` <del> --> $DIR/lint-unnecessary-parens.rs:46:5 </del> <ins> --> $DIR/lint-unnecessary-parens.rs:49:5 </ins> | LL |     while (true) {} |     ^^^^^^^^^^^^ help: use `loop`

= note: `#[warn(while_true)]` on by default error: unnecessary parentheses around `match` head expression <del> --> $DIR/lint-unnecessary-parens.rs:48:11 </del> <ins> --> $DIR/lint-unnecessary-parens.rs:51:11 </ins> | LL |     match (true) { |           ^^^^^^ help: remove these parentheses error: unnecessary parentheses around `let` head expression <del> --> $DIR/lint-unnecessary-parens.rs:51:16 </del> <ins> --> $DIR/lint-unnecessary-parens.rs:54:16 </ins> | LL |     if let 1 = (1) {} |                ^^^ help: remove these parentheses error: unnecessary parentheses around `let` head expression <del> --> $DIR/lint-unnecessary-parens.rs:52:19 </del> <ins> --> $DIR/lint-unnecessary-parens.rs:55:19 </ins> | LL |     while let 1 = (2) {} |                   ^^^ help: remove these parentheses error: unnecessary parentheses around method argument <del> --> $DIR/lint-unnecessary-parens.rs:66:24 </del> <ins> --> $DIR/lint-unnecessary-parens.rs:69:24 </ins> | LL |     X { y: false }.foo((true)); |                        ^^^^^^ help: remove these parentheses error: unnecessary parentheses around assigned value <del> --> $DIR/lint-unnecessary-parens.rs:68:18 </del> <ins> --> $DIR/lint-unnecessary-parens.rs:71:18 </ins> | LL |     let mut _a = (0); |                  ^^^ help: remove these parentheses error: unnecessary parentheses around assigned value <del> --> $DIR/lint-unnecessary-parens.rs:69:10 </del> <ins> --> $DIR/lint-unnecessary-parens.rs:72:10 </ins> | LL |     _a = (0); |          ^^^ help: remove these parentheses error: unnecessary parentheses around assigned value <del> --> $DIR/lint-unnecessary-parens.rs:70:11 </del> <ins> --> $DIR/lint-unnecessary-parens.rs:73:11 </ins> | LL |     _a += (1); |           ^^^ help: remove these parentheses <del> error: aborting due to 15 previous errors </del> <ins> error: aborting due to 17 previous errors </ins>

// run-pass <ins> #![allow(unused_parens)] </ins> #![allow(non_upper_case_globals)] #![allow(dead_code)] // exec-env:RUST_MIN_STACK=16000000