2019-09-03 08:33:30 -05:00
|
|
|
error[E0416]: identifier `a` is bound more than once in the same pattern
|
|
|
|
--> $DIR/issue-54538-unused-parens-lint.rs:35:25
|
2018-10-05 21:09:14 -05:00
|
|
|
|
|
2019-09-03 08:33:30 -05:00
|
|
|
LL | fn foo((Ok(a) | Err(a)): Result<u8, u8>) {} // Doesn't parse if we remove parens for now.
|
|
|
|
| ^ used in a pattern more than once
|
|
|
|
|
|
|
|
error[E0416]: identifier `a` is bound more than once in the same pattern
|
|
|
|
--> $DIR/issue-54538-unused-parens-lint.rs:38:27
|
|
|
|
|
|
|
|
|
LL | let _ = |(Ok(a) | Err(a)): Result<u8, u8>| 1; // `|Ok(a) | Err(a)| 1` parses as bit-or.
|
|
|
|
| ^ used in a pattern more than once
|
|
|
|
|
|
|
|
warning: the feature `or_patterns` is incomplete and may cause the compiler to crash
|
|
|
|
--> $DIR/issue-54538-unused-parens-lint.rs:3:12
|
|
|
|
|
|
|
|
|
LL | #![feature(or_patterns)]
|
|
|
|
| ^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= note: `#[warn(incomplete_features)]` on by default
|
|
|
|
|
|
|
|
error: unnecessary parentheses around pattern
|
|
|
|
--> $DIR/issue-54538-unused-parens-lint.rs:12:9
|
|
|
|
|
|
|
|
|
LL | let (a) = 0;
|
2018-10-05 21:09:14 -05:00
|
|
|
| ^^^ help: remove these parentheses
|
|
|
|
|
|
|
|
|
note: lint level defined here
|
2019-09-03 08:33:30 -05:00
|
|
|
--> $DIR/issue-54538-unused-parens-lint.rs:9:9
|
2018-10-05 21:09:14 -05:00
|
|
|
|
|
2019-09-03 08:33:30 -05:00
|
|
|
LL | #![deny(unused_parens)]
|
2018-10-05 21:09:14 -05:00
|
|
|
| ^^^^^^^^^^^^^
|
|
|
|
|
2019-09-03 08:33:30 -05:00
|
|
|
error: unnecessary parentheses around pattern
|
|
|
|
--> $DIR/issue-54538-unused-parens-lint.rs:13:9
|
|
|
|
|
|
|
|
|
LL | for (a) in 0..1 {}
|
|
|
|
| ^^^ help: remove these parentheses
|
|
|
|
|
|
|
|
error: unnecessary parentheses around pattern
|
|
|
|
--> $DIR/issue-54538-unused-parens-lint.rs:14:12
|
|
|
|
|
|
|
|
|
LL | if let (a) = 0 {}
|
|
|
|
| ^^^ help: remove these parentheses
|
|
|
|
|
|
|
|
error: unnecessary parentheses around pattern
|
|
|
|
--> $DIR/issue-54538-unused-parens-lint.rs:15:15
|
|
|
|
|
|
|
|
|
LL | while let (a) = 0 {}
|
|
|
|
| ^^^ help: remove these parentheses
|
|
|
|
|
|
|
|
error: unnecessary parentheses around pattern
|
|
|
|
--> $DIR/issue-54538-unused-parens-lint.rs:16:12
|
|
|
|
|
|
|
|
|
LL | fn foo((a): u8) {}
|
|
|
|
| ^^^ help: remove these parentheses
|
|
|
|
|
|
|
|
error: unnecessary parentheses around pattern
|
|
|
|
--> $DIR/issue-54538-unused-parens-lint.rs:17:14
|
|
|
|
|
|
|
|
|
LL | let _ = |(a): u8| 0;
|
|
|
|
| ^^^ help: remove these parentheses
|
|
|
|
|
|
|
|
error: unnecessary parentheses around pattern
|
|
|
|
--> $DIR/issue-54538-unused-parens-lint.rs:43:12
|
|
|
|
|
|
|
|
|
LL | if let (0 | 1) = 0 {}
|
|
|
|
| ^^^^^^^ help: remove these parentheses
|
|
|
|
|
|
|
|
error: unnecessary parentheses around pattern
|
|
|
|
--> $DIR/issue-54538-unused-parens-lint.rs:44:13
|
|
|
|
|
|
|
|
|
LL | if let ((0 | 1),) = (0,) {}
|
|
|
|
| ^^^^^^^ help: remove these parentheses
|
|
|
|
|
|
|
|
error: unnecessary parentheses around pattern
|
|
|
|
--> $DIR/issue-54538-unused-parens-lint.rs:45:13
|
|
|
|
|
|
|
|
|
LL | if let [(0 | 1)] = [0] {}
|
|
|
|
| ^^^^^^^ help: remove these parentheses
|
|
|
|
|
|
|
|
error: unnecessary parentheses around pattern
|
|
|
|
--> $DIR/issue-54538-unused-parens-lint.rs:46:16
|
|
|
|
|
|
|
|
|
LL | if let 0 | (1 | 2) = 0 {}
|
|
|
|
| ^^^^^^^ help: remove these parentheses
|
|
|
|
|
|
|
|
error: unnecessary parentheses around pattern
|
|
|
|
--> $DIR/issue-54538-unused-parens-lint.rs:48:15
|
|
|
|
|
|
|
|
|
LL | if let TS((0 | 1)) = TS(0) {}
|
|
|
|
| ^^^^^^^ help: remove these parentheses
|
|
|
|
|
|
|
|
error: unnecessary parentheses around pattern
|
|
|
|
--> $DIR/issue-54538-unused-parens-lint.rs:50:20
|
|
|
|
|
|
|
|
|
LL | if let NS { f: (0 | 1) } = (NS { f: 0 }) {}
|
|
|
|
| ^^^^^^^ help: remove these parentheses
|
|
|
|
|
|
|
|
error: unnecessary parentheses around pattern
|
|
|
|
--> $DIR/issue-54538-unused-parens-lint.rs:60:9
|
|
|
|
|
|
|
|
|
LL | (_) => {}
|
|
|
|
| ^^^ help: remove these parentheses
|
|
|
|
|
|
|
|
error: unnecessary parentheses around pattern
|
|
|
|
--> $DIR/issue-54538-unused-parens-lint.rs:61:9
|
2018-10-05 21:09:14 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | (y) => {}
|
2018-10-05 21:09:14 -05:00
|
|
|
| ^^^ help: remove these parentheses
|
|
|
|
|
2019-09-03 08:33:30 -05:00
|
|
|
error: unnecessary parentheses around pattern
|
|
|
|
--> $DIR/issue-54538-unused-parens-lint.rs:62:9
|
2018-10-05 21:09:14 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | (ref r) => {}
|
2018-10-05 21:09:14 -05:00
|
|
|
| ^^^^^^^ help: remove these parentheses
|
|
|
|
|
2019-09-03 08:33:30 -05:00
|
|
|
error: unnecessary parentheses around pattern
|
|
|
|
--> $DIR/issue-54538-unused-parens-lint.rs:63:9
|
2018-10-05 21:09:14 -05:00
|
|
|
|
|
2019-05-30 05:20:30 -05:00
|
|
|
LL | (e @ 1...2) => {}
|
2018-10-06 21:48:04 -05:00
|
|
|
| ^^^^^^^^^^^ help: remove these parentheses
|
2018-10-05 21:09:14 -05:00
|
|
|
|
2019-09-03 08:33:30 -05:00
|
|
|
error: unnecessary parentheses around pattern
|
|
|
|
--> $DIR/issue-54538-unused-parens-lint.rs:69:9
|
2018-10-05 21:09:14 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | (e @ &(1...2)) => {}
|
2018-10-06 21:48:04 -05:00
|
|
|
| ^^^^^^^^^^^^^^ help: remove these parentheses
|
2018-10-05 21:09:14 -05:00
|
|
|
|
2019-09-03 08:33:30 -05:00
|
|
|
error: unnecessary parentheses around pattern
|
|
|
|
--> $DIR/issue-54538-unused-parens-lint.rs:70:10
|
2019-05-30 05:20:30 -05:00
|
|
|
|
|
|
|
|
LL | &(_) => {}
|
|
|
|
| ^^^ help: remove these parentheses
|
|
|
|
|
2019-09-03 08:33:30 -05:00
|
|
|
error: unnecessary parentheses around pattern
|
|
|
|
--> $DIR/issue-54538-unused-parens-lint.rs:81:9
|
2019-05-30 05:20:30 -05:00
|
|
|
|
|
|
|
|
LL | (_) => {}
|
|
|
|
| ^^^ help: remove these parentheses
|
|
|
|
|
2019-09-03 08:33:30 -05:00
|
|
|
error: unnecessary parentheses around pattern
|
|
|
|
--> $DIR/issue-54538-unused-parens-lint.rs:82:9
|
2019-05-30 05:20:30 -05:00
|
|
|
|
|
|
|
|
LL | (y) => {}
|
|
|
|
| ^^^ help: remove these parentheses
|
|
|
|
|
2019-09-03 08:33:30 -05:00
|
|
|
error: unnecessary parentheses around pattern
|
|
|
|
--> $DIR/issue-54538-unused-parens-lint.rs:83:9
|
2019-05-30 05:20:30 -05:00
|
|
|
|
|
|
|
|
LL | (ref r) => {}
|
|
|
|
| ^^^^^^^ help: remove these parentheses
|
|
|
|
|
2019-09-03 08:33:30 -05:00
|
|
|
error: unnecessary parentheses around pattern
|
|
|
|
--> $DIR/issue-54538-unused-parens-lint.rs:84:9
|
2019-05-30 05:20:30 -05:00
|
|
|
|
|
|
|
|
LL | (e @ 1..=2) => {}
|
|
|
|
| ^^^^^^^^^^^ help: remove these parentheses
|
|
|
|
|
2019-09-03 08:33:30 -05:00
|
|
|
error: unnecessary parentheses around pattern
|
|
|
|
--> $DIR/issue-54538-unused-parens-lint.rs:90:9
|
2019-05-30 05:20:30 -05:00
|
|
|
|
|
|
|
|
LL | (e @ &(1..=2)) => {}
|
|
|
|
| ^^^^^^^^^^^^^^ help: remove these parentheses
|
|
|
|
|
2019-09-03 08:33:30 -05:00
|
|
|
error: unnecessary parentheses around pattern
|
|
|
|
--> $DIR/issue-54538-unused-parens-lint.rs:91:10
|
2018-10-05 21:09:14 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | &(_) => {}
|
2018-10-06 21:48:04 -05:00
|
|
|
| ^^^ help: remove these parentheses
|
2018-10-05 21:09:14 -05:00
|
|
|
|
2019-09-03 08:33:30 -05:00
|
|
|
error: aborting due to 26 previous errors
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0416`.
|