rust/tests/ui/lint/unused/issue-54538-unused-parens-lint.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

320 lines
6.9 KiB
Plaintext
Raw Normal View History

error: unnecessary parentheses around pattern
2020-11-21 16:05:17 -06:00
--> $DIR/issue-54538-unused-parens-lint.rs:16:9
|
LL | let (a) = 0;
| ^ ^
|
2020-01-22 17:57:38 -06:00
note: the lint level is defined here
2020-11-21 16:05:17 -06:00
--> $DIR/issue-54538-unused-parens-lint.rs:13:9
|
LL | #![deny(unused_parens)]
| ^^^^^^^^^^^^^
help: remove these parentheses
|
LL - let (a) = 0;
LL + let a = 0;
2022-06-08 12:34:57 -05:00
|
error: unnecessary parentheses around pattern
2020-11-21 16:05:17 -06:00
--> $DIR/issue-54538-unused-parens-lint.rs:17:9
|
LL | for (a) in 0..1 {}
| ^ ^
|
help: remove these parentheses
|
LL - for (a) in 0..1 {}
LL + for a in 0..1 {}
2022-06-08 12:34:57 -05:00
|
error: unnecessary parentheses around pattern
2020-11-21 16:05:17 -06:00
--> $DIR/issue-54538-unused-parens-lint.rs:18:12
|
LL | if let (a) = 0 {}
| ^ ^
|
help: remove these parentheses
|
LL - if let (a) = 0 {}
LL + if let a = 0 {}
2022-06-08 12:34:57 -05:00
|
error: unnecessary parentheses around pattern
2020-11-21 16:05:17 -06:00
--> $DIR/issue-54538-unused-parens-lint.rs:19:15
|
LL | while let (a) = 0 {}
| ^ ^
|
help: remove these parentheses
|
LL - while let (a) = 0 {}
LL + while let a = 0 {}
2022-06-08 12:34:57 -05:00
|
error: unnecessary parentheses around pattern
2020-11-21 16:05:17 -06:00
--> $DIR/issue-54538-unused-parens-lint.rs:20:12
|
LL | fn foo((a): u8) {}
| ^ ^
|
help: remove these parentheses
|
LL - fn foo((a): u8) {}
LL + fn foo(a: u8) {}
2022-06-08 12:34:57 -05:00
|
error: unnecessary parentheses around pattern
2020-11-21 16:05:17 -06:00
--> $DIR/issue-54538-unused-parens-lint.rs:21:14
|
LL | let _ = |(a): u8| 0;
| ^ ^
|
help: remove these parentheses
|
LL - let _ = |(a): u8| 0;
LL + let _ = |a: u8| 0;
2022-06-08 12:34:57 -05:00
|
error: unnecessary parentheses around `if` condition
--> $DIR/issue-54538-unused-parens-lint.rs:45:15
|
LL | loop { if (break) {} }
| ^ ^
|
help: remove these parentheses
|
LL - loop { if (break) {} }
LL + loop { if break {} }
|
error: unnecessary parentheses around `if` condition
--> $DIR/issue-54538-unused-parens-lint.rs:46:15
|
LL | loop { if (break ({ println!("hello") })) {} }
| ^ ^
|
help: remove these parentheses
|
LL - loop { if (break ({ println!("hello") })) {} }
LL + loop { if break ({ println!("hello") }) {} }
|
error: unnecessary parentheses around pattern
--> $DIR/issue-54538-unused-parens-lint.rs:71:12
|
LL | if let (0 | 1) = 0 {}
| ^ ^
|
help: remove these parentheses
|
LL - if let (0 | 1) = 0 {}
LL + if let 0 | 1 = 0 {}
2022-06-08 12:34:57 -05:00
|
error: unnecessary parentheses around pattern
--> $DIR/issue-54538-unused-parens-lint.rs:72:13
|
LL | if let ((0 | 1),) = (0,) {}
| ^ ^
|
help: remove these parentheses
|
LL - if let ((0 | 1),) = (0,) {}
LL + if let (0 | 1,) = (0,) {}
2022-06-08 12:34:57 -05:00
|
error: unnecessary parentheses around pattern
--> $DIR/issue-54538-unused-parens-lint.rs:73:13
|
LL | if let [(0 | 1)] = [0] {}
| ^ ^
|
help: remove these parentheses
|
LL - if let [(0 | 1)] = [0] {}
LL + if let [0 | 1] = [0] {}
2022-06-08 12:34:57 -05:00
|
error: unnecessary parentheses around pattern
--> $DIR/issue-54538-unused-parens-lint.rs:74:16
|
LL | if let 0 | (1 | 2) = 0 {}
| ^ ^
|
help: remove these parentheses
|
LL - if let 0 | (1 | 2) = 0 {}
LL + if let 0 | 1 | 2 = 0 {}
2022-06-08 12:34:57 -05:00
|
error: unnecessary parentheses around pattern
--> $DIR/issue-54538-unused-parens-lint.rs:76:15
|
LL | if let TS((0 | 1)) = TS(0) {}
| ^ ^
|
help: remove these parentheses
|
LL - if let TS((0 | 1)) = TS(0) {}
LL + if let TS(0 | 1) = TS(0) {}
2022-06-08 12:34:57 -05:00
|
error: unnecessary parentheses around pattern
--> $DIR/issue-54538-unused-parens-lint.rs:78:20
|
LL | if let NS { f: (0 | 1) } = (NS { f: 0 }) {}
| ^ ^
|
help: remove these parentheses
|
LL - if let NS { f: (0 | 1) } = (NS { f: 0 }) {}
LL + if let NS { f: 0 | 1 } = (NS { f: 0 }) {}
2022-06-08 12:34:57 -05:00
|
error: unnecessary parentheses around pattern
--> $DIR/issue-54538-unused-parens-lint.rs:88:9
|
LL | (_) => {}
| ^ ^
|
help: remove these parentheses
|
LL - (_) => {}
LL + _ => {}
2022-06-08 12:34:57 -05:00
|
error: unnecessary parentheses around pattern
--> $DIR/issue-54538-unused-parens-lint.rs:89:9
|
2019-03-09 06:03:44 -06:00
LL | (y) => {}
| ^ ^
|
help: remove these parentheses
|
LL - (y) => {}
LL + y => {}
2022-06-08 12:34:57 -05:00
|
error: unnecessary parentheses around pattern
--> $DIR/issue-54538-unused-parens-lint.rs:90:9
|
2019-03-09 06:03:44 -06:00
LL | (ref r) => {}
| ^ ^
|
help: remove these parentheses
|
LL - (ref r) => {}
LL + ref r => {}
2022-06-08 12:34:57 -05:00
|
error: unnecessary parentheses around pattern
--> $DIR/issue-54538-unused-parens-lint.rs:91:9
|
LL | (e @ 1...2) => {}
| ^ ^
|
help: remove these parentheses
|
LL - (e @ 1...2) => {}
LL + e @ 1...2 => {}
2022-06-08 12:34:57 -05:00
|
error: unnecessary parentheses around pattern
--> $DIR/issue-54538-unused-parens-lint.rs:97:9
|
2019-03-09 06:03:44 -06:00
LL | (e @ &(1...2)) => {}
| ^ ^
|
help: remove these parentheses
|
LL - (e @ &(1...2)) => {}
LL + e @ &(1...2) => {}
2022-06-08 12:34:57 -05:00
|
error: unnecessary parentheses around pattern
--> $DIR/issue-54538-unused-parens-lint.rs:98:10
|
LL | &(_) => {}
| ^ ^
|
help: remove these parentheses
|
LL - &(_) => {}
LL + &_ => {}
2022-06-08 12:34:57 -05:00
|
error: unnecessary parentheses around pattern
--> $DIR/issue-54538-unused-parens-lint.rs:109:9
|
LL | (_) => {}
| ^ ^
|
help: remove these parentheses
|
LL - (_) => {}
LL + _ => {}
2022-06-08 12:34:57 -05:00
|
error: unnecessary parentheses around pattern
--> $DIR/issue-54538-unused-parens-lint.rs:110:9
|
LL | (y) => {}
| ^ ^
|
help: remove these parentheses
|
LL - (y) => {}
LL + y => {}
2022-06-08 12:34:57 -05:00
|
error: unnecessary parentheses around pattern
--> $DIR/issue-54538-unused-parens-lint.rs:111:9
|
LL | (ref r) => {}
| ^ ^
|
help: remove these parentheses
|
LL - (ref r) => {}
LL + ref r => {}
2022-06-08 12:34:57 -05:00
|
error: unnecessary parentheses around pattern
--> $DIR/issue-54538-unused-parens-lint.rs:112:9
|
LL | (e @ 1..=2) => {}
| ^ ^
|
help: remove these parentheses
|
LL - (e @ 1..=2) => {}
LL + e @ 1..=2 => {}
2022-06-08 12:34:57 -05:00
|
error: unnecessary parentheses around pattern
--> $DIR/issue-54538-unused-parens-lint.rs:118:9
|
LL | (e @ &(1..=2)) => {}
| ^ ^
|
help: remove these parentheses
|
LL - (e @ &(1..=2)) => {}
LL + e @ &(1..=2) => {}
2022-06-08 12:34:57 -05:00
|
error: unnecessary parentheses around pattern
--> $DIR/issue-54538-unused-parens-lint.rs:119:10
|
2019-03-09 06:03:44 -06:00
LL | &(_) => {}
| ^ ^
|
help: remove these parentheses
|
LL - &(_) => {}
LL + &_ => {}
2022-06-08 12:34:57 -05:00
|
error: aborting due to 26 previous errors