2018-08-08 07:28:26 -05:00
|
|
|
error: unnecessary parentheses around `return` value
|
2020-07-02 00:32:12 -05:00
|
|
|
--> $DIR/lint-unnecessary-parens.rs:13:12
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | return (1);
|
2021-09-09 09:22:24 -05:00
|
|
|
| ^ ^
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2020-01-22 17:57:38 -06:00
|
|
|
note: the lint level is defined here
|
2020-07-02 00:32:12 -05:00
|
|
|
--> $DIR/lint-unnecessary-parens.rs:3:9
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | #![deny(unused_parens)]
|
|
|
|
| ^^^^^^^^^^^^^
|
2021-09-09 09:22:24 -05:00
|
|
|
help: remove these parentheses
|
|
|
|
|
|
|
|
|
LL - return (1);
|
|
|
|
LL + return 1;
|
2022-06-08 12:34:57 -05:00
|
|
|
|
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
error: unnecessary parentheses around `return` value
|
2020-07-02 00:32:12 -05:00
|
|
|
--> $DIR/lint-unnecessary-parens.rs:16:12
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | return (X { y });
|
2021-09-09 09:22:24 -05:00
|
|
|
| ^ ^
|
|
|
|
|
|
|
|
|
help: remove these parentheses
|
|
|
|
|
|
|
|
|
LL - return (X { y });
|
|
|
|
LL + return X { y };
|
2022-06-08 12:34:57 -05:00
|
|
|
|
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2019-10-04 00:56:57 -05:00
|
|
|
error: unnecessary parentheses around type
|
2020-07-02 00:32:12 -05:00
|
|
|
--> $DIR/lint-unnecessary-parens.rs:19:46
|
2019-10-04 00:56:57 -05:00
|
|
|
|
|
2020-07-02 00:32:12 -05:00
|
|
|
LL | pub fn unused_parens_around_return_type() -> (u32) {
|
2021-09-09 09:22:24 -05:00
|
|
|
| ^ ^
|
|
|
|
|
|
|
|
|
help: remove these parentheses
|
|
|
|
|
|
|
|
|
LL - pub fn unused_parens_around_return_type() -> (u32) {
|
|
|
|
LL + pub fn unused_parens_around_return_type() -> u32 {
|
2022-06-08 12:34:57 -05:00
|
|
|
|
|
2019-10-04 00:56:57 -05:00
|
|
|
|
2020-01-22 23:42:35 -06:00
|
|
|
error: unnecessary parentheses around block return value
|
2020-07-02 00:32:12 -05:00
|
|
|
--> $DIR/lint-unnecessary-parens.rs:25:9
|
2020-01-22 23:42:35 -06:00
|
|
|
|
|
|
|
|
LL | (5)
|
2021-09-09 09:22:24 -05:00
|
|
|
| ^ ^
|
|
|
|
|
|
|
|
|
help: remove these parentheses
|
|
|
|
|
|
|
|
|
LL - (5)
|
|
|
|
LL + 5
|
2022-06-08 12:34:57 -05:00
|
|
|
|
|
2020-01-22 23:42:35 -06:00
|
|
|
|
|
|
|
error: unnecessary parentheses around block return value
|
2020-07-02 00:32:12 -05:00
|
|
|
--> $DIR/lint-unnecessary-parens.rs:27:5
|
2020-01-22 23:42:35 -06:00
|
|
|
|
|
|
|
|
LL | (5)
|
2021-09-09 09:22:24 -05:00
|
|
|
| ^ ^
|
|
|
|
|
|
|
|
|
help: remove these parentheses
|
|
|
|
|
|
|
|
|
LL - (5)
|
|
|
|
LL + 5
|
2022-06-08 12:34:57 -05:00
|
|
|
|
|
2020-01-22 23:42:35 -06:00
|
|
|
|
2023-06-05 09:25:00 -05:00
|
|
|
error: unnecessary parentheses around `if` condition
|
|
|
|
--> $DIR/lint-unnecessary-parens.rs:39:7
|
|
|
|
|
|
|
|
|
LL | if(true) {}
|
|
|
|
| ^ ^
|
|
|
|
|
|
|
|
|
help: remove these parentheses
|
|
|
|
|
|
|
|
|
LL - if(true) {}
|
|
|
|
LL + if true {}
|
|
|
|
|
|
|
|
|
|
|
|
|
error: unnecessary parentheses around `while` condition
|
|
|
|
--> $DIR/lint-unnecessary-parens.rs:40:10
|
|
|
|
|
|
|
|
|
LL | while(true) {}
|
|
|
|
| ^ ^
|
|
|
|
|
|
|
|
|
help: remove these parentheses
|
|
|
|
|
|
|
|
|
LL - while(true) {}
|
|
|
|
LL + while true {}
|
|
|
|
|
|
|
|
|
|
|
|
|
error: unnecessary parentheses around `for` iterator expression
|
|
|
|
--> $DIR/lint-unnecessary-parens.rs:41:13
|
|
|
|
|
|
|
|
|
LL | for _ in(e) {}
|
|
|
|
| ^ ^
|
|
|
|
|
|
|
|
|
help: remove these parentheses
|
|
|
|
|
|
|
|
|
LL - for _ in(e) {}
|
|
|
|
LL + for _ in e {}
|
|
|
|
|
|
|
|
|
|
|
|
|
error: unnecessary parentheses around `match` scrutinee expression
|
|
|
|
--> $DIR/lint-unnecessary-parens.rs:42:10
|
|
|
|
|
|
|
|
|
LL | match(1) { _ => ()}
|
|
|
|
| ^ ^
|
|
|
|
|
|
|
|
|
help: remove these parentheses
|
|
|
|
|
|
|
|
|
LL - match(1) { _ => ()}
|
|
|
|
LL + match 1 { _ => ()}
|
|
|
|
|
|
|
|
|
|
|
|
|
error: unnecessary parentheses around `return` value
|
|
|
|
--> $DIR/lint-unnecessary-parens.rs:43:11
|
|
|
|
|
|
|
|
|
LL | return(1);
|
|
|
|
| ^ ^
|
|
|
|
|
|
|
|
|
help: remove these parentheses
|
|
|
|
|
|
|
|
|
LL - return(1);
|
|
|
|
LL + return 1;
|
|
|
|
|
|
|
|
|
|
2020-02-01 17:30:52 -06:00
|
|
|
error: unnecessary parentheses around assigned value
|
2023-06-05 09:25:00 -05:00
|
|
|
--> $DIR/lint-unnecessary-parens.rs:52:31
|
2020-02-01 17:30:52 -06:00
|
|
|
|
|
2020-07-02 00:32:12 -05:00
|
|
|
LL | pub const CONST_ITEM: usize = (10);
|
2021-09-09 09:22:24 -05:00
|
|
|
| ^ ^
|
|
|
|
|
|
|
|
|
help: remove these parentheses
|
|
|
|
|
|
|
|
|
LL - pub const CONST_ITEM: usize = (10);
|
|
|
|
LL + pub const CONST_ITEM: usize = 10;
|
2022-06-08 12:34:57 -05:00
|
|
|
|
|
2020-02-01 17:30:52 -06:00
|
|
|
|
|
|
|
error: unnecessary parentheses around assigned value
|
2023-06-05 09:25:00 -05:00
|
|
|
--> $DIR/lint-unnecessary-parens.rs:53:33
|
2020-02-01 17:30:52 -06:00
|
|
|
|
|
2020-07-02 00:32:12 -05:00
|
|
|
LL | pub static STATIC_ITEM: usize = (10);
|
2021-09-09 09:22:24 -05:00
|
|
|
| ^ ^
|
|
|
|
|
|
|
|
|
help: remove these parentheses
|
|
|
|
|
|
|
|
|
LL - pub static STATIC_ITEM: usize = (10);
|
|
|
|
LL + pub static STATIC_ITEM: usize = 10;
|
2022-06-08 12:34:57 -05:00
|
|
|
|
|
2020-02-01 17:30:52 -06:00
|
|
|
|
2018-08-08 07:28:26 -05:00
|
|
|
error: unnecessary parentheses around function argument
|
2023-06-05 09:25:00 -05:00
|
|
|
--> $DIR/lint-unnecessary-parens.rs:57:9
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | bar((true));
|
2021-09-09 09:22:24 -05:00
|
|
|
| ^ ^
|
|
|
|
|
|
|
|
|
help: remove these parentheses
|
|
|
|
|
|
|
|
|
LL - bar((true));
|
|
|
|
LL + bar(true);
|
2022-06-08 12:34:57 -05:00
|
|
|
|
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
error: unnecessary parentheses around `if` condition
|
2023-06-05 09:25:00 -05:00
|
|
|
--> $DIR/lint-unnecessary-parens.rs:59:8
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | if (true) {}
|
2021-09-09 09:22:24 -05:00
|
|
|
| ^ ^
|
|
|
|
|
|
|
|
|
help: remove these parentheses
|
|
|
|
|
|
|
|
|
LL - if (true) {}
|
|
|
|
LL + if true {}
|
2022-06-08 12:34:57 -05:00
|
|
|
|
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
error: unnecessary parentheses around `while` condition
|
2023-06-05 09:25:00 -05:00
|
|
|
--> $DIR/lint-unnecessary-parens.rs:60:11
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | while (true) {}
|
2021-09-09 09:22:24 -05:00
|
|
|
| ^ ^
|
|
|
|
|
|
|
|
|
help: remove these parentheses
|
|
|
|
|
|
|
|
|
LL - while (true) {}
|
|
|
|
LL + while true {}
|
2022-06-08 12:34:57 -05:00
|
|
|
|
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2020-03-31 11:42:54 -05:00
|
|
|
error: unnecessary parentheses around `match` scrutinee expression
|
2023-06-05 09:25:00 -05:00
|
|
|
--> $DIR/lint-unnecessary-parens.rs:61:11
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | match (true) {
|
2021-09-09 09:22:24 -05:00
|
|
|
| ^ ^
|
|
|
|
|
|
|
|
|
help: remove these parentheses
|
|
|
|
|
|
|
|
|
LL - match (true) {
|
|
|
|
LL + match true {
|
2022-06-08 12:34:57 -05:00
|
|
|
|
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2020-03-31 11:42:54 -05:00
|
|
|
error: unnecessary parentheses around `let` scrutinee expression
|
2023-06-05 09:25:00 -05:00
|
|
|
--> $DIR/lint-unnecessary-parens.rs:64:16
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | if let 1 = (1) {}
|
2021-09-09 09:22:24 -05:00
|
|
|
| ^ ^
|
|
|
|
|
|
|
|
|
help: remove these parentheses
|
|
|
|
|
|
|
|
|
LL - if let 1 = (1) {}
|
|
|
|
LL + if let 1 = 1 {}
|
2022-06-08 12:34:57 -05:00
|
|
|
|
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2020-03-31 11:42:54 -05:00
|
|
|
error: unnecessary parentheses around `let` scrutinee expression
|
2023-06-05 09:25:00 -05:00
|
|
|
--> $DIR/lint-unnecessary-parens.rs:65:19
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | while let 1 = (2) {}
|
2021-09-09 09:22:24 -05:00
|
|
|
| ^ ^
|
|
|
|
|
|
|
|
|
help: remove these parentheses
|
|
|
|
|
|
|
|
|
LL - while let 1 = (2) {}
|
|
|
|
LL + while let 1 = 2 {}
|
2022-06-08 12:34:57 -05:00
|
|
|
|
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
error: unnecessary parentheses around method argument
|
2023-06-05 09:25:00 -05:00
|
|
|
--> $DIR/lint-unnecessary-parens.rs:81:24
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | X { y: false }.foo((true));
|
2021-09-09 09:22:24 -05:00
|
|
|
| ^ ^
|
|
|
|
|
|
|
|
|
help: remove these parentheses
|
|
|
|
|
|
|
|
|
LL - X { y: false }.foo((true));
|
|
|
|
LL + X { y: false }.foo(true);
|
2022-06-08 12:34:57 -05:00
|
|
|
|
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
error: unnecessary parentheses around assigned value
|
2023-06-05 09:25:00 -05:00
|
|
|
--> $DIR/lint-unnecessary-parens.rs:83:18
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | let mut _a = (0);
|
2021-09-09 09:22:24 -05:00
|
|
|
| ^ ^
|
|
|
|
|
|
|
|
|
help: remove these parentheses
|
|
|
|
|
|
|
|
|
LL - let mut _a = (0);
|
|
|
|
LL + let mut _a = 0;
|
2022-06-08 12:34:57 -05:00
|
|
|
|
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
error: unnecessary parentheses around assigned value
|
2023-06-05 09:25:00 -05:00
|
|
|
--> $DIR/lint-unnecessary-parens.rs:84:10
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | _a = (0);
|
2021-09-09 09:22:24 -05:00
|
|
|
| ^ ^
|
|
|
|
|
|
|
|
|
help: remove these parentheses
|
|
|
|
|
|
|
|
|
LL - _a = (0);
|
|
|
|
LL + _a = 0;
|
2022-06-08 12:34:57 -05:00
|
|
|
|
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
error: unnecessary parentheses around assigned value
|
2023-06-05 09:25:00 -05:00
|
|
|
--> $DIR/lint-unnecessary-parens.rs:85:11
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | _a += (1);
|
2021-09-09 09:22:24 -05:00
|
|
|
| ^ ^
|
|
|
|
|
|
|
|
|
help: remove these parentheses
|
|
|
|
|
|
|
|
|
LL - _a += (1);
|
|
|
|
LL + _a += 1;
|
2022-06-08 12:34:57 -05:00
|
|
|
|
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2023-10-30 08:34:55 -05:00
|
|
|
error: unnecessary parentheses around pattern
|
|
|
|
--> $DIR/lint-unnecessary-parens.rs:87:8
|
|
|
|
|
|
|
|
|
LL | let(mut _a) = 3;
|
|
|
|
| ^ ^
|
|
|
|
|
|
|
|
|
help: remove these parentheses
|
|
|
|
|
|
|
|
|
LL - let(mut _a) = 3;
|
|
|
|
LL + let mut _a = 3;
|
|
|
|
|
|
|
|
|
|
|
|
|
error: unnecessary parentheses around pattern
|
|
|
|
--> $DIR/lint-unnecessary-parens.rs:88:9
|
|
|
|
|
|
|
|
|
LL | let (mut _a) = 3;
|
|
|
|
| ^ ^
|
|
|
|
|
|
|
|
|
help: remove these parentheses
|
|
|
|
|
|
|
|
|
LL - let (mut _a) = 3;
|
|
|
|
LL + let mut _a = 3;
|
|
|
|
|
|
|
|
|
|
|
|
|
error: unnecessary parentheses around pattern
|
|
|
|
--> $DIR/lint-unnecessary-parens.rs:89:8
|
|
|
|
|
|
|
|
|
LL | let( mut _a) = 3;
|
|
|
|
| ^^ ^
|
|
|
|
|
|
|
|
|
help: remove these parentheses
|
|
|
|
|
|
|
|
|
LL - let( mut _a) = 3;
|
|
|
|
LL + let mut _a = 3;
|
|
|
|
|
|
|
|
|
|
|
|
|
error: unnecessary parentheses around pattern
|
|
|
|
--> $DIR/lint-unnecessary-parens.rs:91:8
|
|
|
|
|
|
|
|
|
LL | let(_a) = 3;
|
|
|
|
| ^ ^
|
|
|
|
|
|
|
|
|
help: remove these parentheses
|
|
|
|
|
|
|
|
|
LL - let(_a) = 3;
|
|
|
|
LL + let _a = 3;
|
|
|
|
|
|
|
|
|
|
|
|
|
error: unnecessary parentheses around pattern
|
|
|
|
--> $DIR/lint-unnecessary-parens.rs:92:9
|
|
|
|
|
|
|
|
|
LL | let (_a) = 3;
|
|
|
|
| ^ ^
|
|
|
|
|
|
|
|
|
help: remove these parentheses
|
|
|
|
|
|
|
|
|
LL - let (_a) = 3;
|
|
|
|
LL + let _a = 3;
|
|
|
|
|
|
|
|
|
|
|
|
|
error: unnecessary parentheses around pattern
|
|
|
|
--> $DIR/lint-unnecessary-parens.rs:93:8
|
|
|
|
|
|
|
|
|
LL | let( _a) = 3;
|
|
|
|
| ^^ ^
|
|
|
|
|
|
|
|
|
help: remove these parentheses
|
|
|
|
|
|
|
|
|
LL - let( _a) = 3;
|
|
|
|
LL + let _a = 3;
|
|
|
|
|
|
|
|
|
|
|
|
|
error: aborting due to 28 previous errors
|
2018-08-08 07:28:26 -05:00
|
|
|
|