2020-06-09 09:36:01 -05:00
|
|
|
error: unnested or-patterns
|
2023-06-16 14:39:02 -05:00
|
|
|
--> $DIR/unnested_or_patterns.rs:18:12
|
2020-06-09 09:36:01 -05:00
|
|
|
|
|
|
|
|
LL | if let box 0 | box 2 = Box::new(0) {}
|
|
|
|
| ^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= note: `-D clippy::unnested-or-patterns` implied by `-D warnings`
|
|
|
|
help: nest the patterns
|
|
|
|
|
|
|
|
|
LL | if let box (0 | 2) = Box::new(0) {}
|
2021-08-11 09:21:33 -05:00
|
|
|
| ~~~~~~~~~~~
|
2020-06-09 09:36:01 -05:00
|
|
|
|
|
|
|
error: unnested or-patterns
|
2023-06-16 14:39:02 -05:00
|
|
|
--> $DIR/unnested_or_patterns.rs:19:12
|
2020-06-09 09:36:01 -05:00
|
|
|
|
|
|
|
|
LL | if let box ((0 | 1)) | box (2 | 3) | box 4 = Box::new(0) {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: nest the patterns
|
|
|
|
|
|
|
|
|
LL | if let box (0 | 1 | 2 | 3 | 4) = Box::new(0) {}
|
2021-08-11 09:21:33 -05:00
|
|
|
| ~~~~~~~~~~~~~~~~~~~~~~~
|
2020-06-09 09:36:01 -05:00
|
|
|
|
|
|
|
error: unnested or-patterns
|
2023-06-16 14:39:02 -05:00
|
|
|
--> $DIR/unnested_or_patterns.rs:21:12
|
2020-06-09 09:36:01 -05:00
|
|
|
|
|
2022-04-01 23:36:30 -05:00
|
|
|
LL | if let Some(1) | C0 | Some(2) = None {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^
|
2020-06-09 09:36:01 -05:00
|
|
|
|
|
|
|
|
help: nest the patterns
|
|
|
|
|
|
2022-04-01 23:36:30 -05:00
|
|
|
LL | if let Some(1 | 2) | C0 = None {}
|
|
|
|
| ~~~~~~~~~~~~~~~~
|
2020-06-09 09:36:01 -05:00
|
|
|
|
|
|
|
error: unnested or-patterns
|
2023-06-16 14:39:02 -05:00
|
|
|
--> $DIR/unnested_or_patterns.rs:22:12
|
2020-06-09 09:36:01 -05:00
|
|
|
|
|
|
|
|
LL | if let &mut 0 | &mut 2 = &mut 0 {}
|
|
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: nest the patterns
|
|
|
|
|
|
|
|
|
LL | if let &mut (0 | 2) = &mut 0 {}
|
2021-08-11 09:21:33 -05:00
|
|
|
| ~~~~~~~~~~~~
|
2020-06-09 09:36:01 -05:00
|
|
|
|
|
|
|
error: unnested or-patterns
|
2023-06-16 14:39:02 -05:00
|
|
|
--> $DIR/unnested_or_patterns.rs:23:12
|
2020-06-09 09:36:01 -05:00
|
|
|
|
|
|
|
|
LL | if let x @ 0 | x @ 2 = 0 {}
|
|
|
|
| ^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: nest the patterns
|
|
|
|
|
|
|
|
|
LL | if let x @ (0 | 2) = 0 {}
|
2021-08-11 09:21:33 -05:00
|
|
|
| ~~~~~~~~~~~
|
2020-06-09 09:36:01 -05:00
|
|
|
|
|
|
|
error: unnested or-patterns
|
2023-06-16 14:39:02 -05:00
|
|
|
--> $DIR/unnested_or_patterns.rs:24:12
|
2020-06-09 09:36:01 -05:00
|
|
|
|
|
|
|
|
LL | if let (0, 1) | (0, 2) | (0, 3) = (0, 0) {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: nest the patterns
|
|
|
|
|
|
|
|
|
LL | if let (0, 1 | 2 | 3) = (0, 0) {}
|
2021-08-11 09:21:33 -05:00
|
|
|
| ~~~~~~~~~~~~~~
|
2020-06-09 09:36:01 -05:00
|
|
|
|
|
|
|
error: unnested or-patterns
|
2023-06-16 14:39:02 -05:00
|
|
|
--> $DIR/unnested_or_patterns.rs:25:12
|
2020-06-09 09:36:01 -05:00
|
|
|
|
|
|
|
|
LL | if let (1, 0) | (2, 0) | (3, 0) = (0, 0) {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: nest the patterns
|
|
|
|
|
|
|
|
|
LL | if let (1 | 2 | 3, 0) = (0, 0) {}
|
2021-08-11 09:21:33 -05:00
|
|
|
| ~~~~~~~~~~~~~~
|
2020-06-09 09:36:01 -05:00
|
|
|
|
|
|
|
error: unnested or-patterns
|
2023-06-16 14:39:02 -05:00
|
|
|
--> $DIR/unnested_or_patterns.rs:26:12
|
2020-06-09 09:36:01 -05:00
|
|
|
|
|
|
|
|
LL | if let (x, ..) | (x, 1) | (x, 2) = (0, 1) {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: nest the patterns
|
|
|
|
|
|
|
|
|
LL | if let (x, ..) | (x, 1 | 2) = (0, 1) {}
|
2021-08-11 09:21:33 -05:00
|
|
|
| ~~~~~~~~~~~~~~~~~~~~
|
2020-06-09 09:36:01 -05:00
|
|
|
|
|
|
|
error: unnested or-patterns
|
2023-06-16 14:39:02 -05:00
|
|
|
--> $DIR/unnested_or_patterns.rs:27:12
|
2020-06-09 09:36:01 -05:00
|
|
|
|
|
|
|
|
LL | if let [0] | [1] = [0] {}
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: nest the patterns
|
|
|
|
|
|
|
|
|
LL | if let [0 | 1] = [0] {}
|
2021-08-11 09:21:33 -05:00
|
|
|
| ~~~~~~~
|
2020-06-09 09:36:01 -05:00
|
|
|
|
|
|
|
error: unnested or-patterns
|
2023-06-16 14:39:02 -05:00
|
|
|
--> $DIR/unnested_or_patterns.rs:28:12
|
2020-06-09 09:36:01 -05:00
|
|
|
|
|
|
|
|
LL | if let [x, 0] | [x, 1] = [0, 1] {}
|
|
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: nest the patterns
|
|
|
|
|
|
|
|
|
LL | if let [x, 0 | 1] = [0, 1] {}
|
2021-08-11 09:21:33 -05:00
|
|
|
| ~~~~~~~~~~
|
2020-06-09 09:36:01 -05:00
|
|
|
|
|
|
|
error: unnested or-patterns
|
2023-06-16 14:39:02 -05:00
|
|
|
--> $DIR/unnested_or_patterns.rs:29:12
|
2020-06-09 09:36:01 -05:00
|
|
|
|
|
|
|
|
LL | if let [x, 0] | [x, 1] | [x, 2] = [0, 1] {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: nest the patterns
|
|
|
|
|
|
|
|
|
LL | if let [x, 0 | 1 | 2] = [0, 1] {}
|
2021-08-11 09:21:33 -05:00
|
|
|
| ~~~~~~~~~~~~~~
|
2020-06-09 09:36:01 -05:00
|
|
|
|
|
|
|
error: unnested or-patterns
|
2023-06-16 14:39:02 -05:00
|
|
|
--> $DIR/unnested_or_patterns.rs:30:12
|
2020-06-09 09:36:01 -05:00
|
|
|
|
|
|
|
|
LL | if let [x, ..] | [x, 1] | [x, 2] = [0, 1] {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: nest the patterns
|
|
|
|
|
|
|
|
|
LL | if let [x, ..] | [x, 1 | 2] = [0, 1] {}
|
2021-08-11 09:21:33 -05:00
|
|
|
| ~~~~~~~~~~~~~~~~~~~~
|
2020-06-09 09:36:01 -05:00
|
|
|
|
|
|
|
error: unnested or-patterns
|
2023-06-16 14:39:02 -05:00
|
|
|
--> $DIR/unnested_or_patterns.rs:32:12
|
2020-06-09 09:36:01 -05:00
|
|
|
|
|
|
|
|
LL | if let TS(0, x) | TS(1, x) = TS(0, 0) {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: nest the patterns
|
|
|
|
|
|
|
|
|
LL | if let TS(0 | 1, x) = TS(0, 0) {}
|
2021-08-11 09:21:33 -05:00
|
|
|
| ~~~~~~~~~~~~
|
2020-06-09 09:36:01 -05:00
|
|
|
|
|
|
|
error: unnested or-patterns
|
2023-06-16 14:39:02 -05:00
|
|
|
--> $DIR/unnested_or_patterns.rs:33:12
|
2020-06-09 09:36:01 -05:00
|
|
|
|
|
|
|
|
LL | if let TS(1, 0) | TS(2, 0) | TS(3, 0) = TS(0, 0) {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: nest the patterns
|
|
|
|
|
|
|
|
|
LL | if let TS(1 | 2 | 3, 0) = TS(0, 0) {}
|
2021-08-11 09:21:33 -05:00
|
|
|
| ~~~~~~~~~~~~~~~~
|
2020-06-09 09:36:01 -05:00
|
|
|
|
|
|
|
error: unnested or-patterns
|
2023-06-16 14:39:02 -05:00
|
|
|
--> $DIR/unnested_or_patterns.rs:34:12
|
2020-06-09 09:36:01 -05:00
|
|
|
|
|
|
|
|
LL | if let TS(x, ..) | TS(x, 1) | TS(x, 2) = TS(0, 0) {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: nest the patterns
|
|
|
|
|
|
|
|
|
LL | if let TS(x, ..) | TS(x, 1 | 2) = TS(0, 0) {}
|
2021-08-11 09:21:33 -05:00
|
|
|
| ~~~~~~~~~~~~~~~~~~~~~~~~
|
2020-06-09 09:36:01 -05:00
|
|
|
|
|
|
|
error: unnested or-patterns
|
2023-06-16 14:39:02 -05:00
|
|
|
--> $DIR/unnested_or_patterns.rs:39:12
|
2020-06-09 09:36:01 -05:00
|
|
|
|
|
|
|
|
LL | if let S { x: 0, y } | S { y, x: 1 } = (S { x: 0, y: 1 }) {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: nest the patterns
|
|
|
|
|
|
|
|
|
LL | if let S { x: 0 | 1, y } = (S { x: 0, y: 1 }) {}
|
2021-08-11 09:21:33 -05:00
|
|
|
| ~~~~~~~~~~~~~~~~~
|
2020-06-09 09:36:01 -05:00
|
|
|
|
2022-10-21 16:35:39 -05:00
|
|
|
error: unnested or-patterns
|
2023-06-16 14:39:02 -05:00
|
|
|
--> $DIR/unnested_or_patterns.rs:50:12
|
2022-10-21 16:35:39 -05:00
|
|
|
|
|
|
|
|
LL | if let [1] | [53] = [0] {}
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: nest the patterns
|
|
|
|
|
|
|
|
|
LL | if let [1 | 53] = [0] {}
|
|
|
|
| ~~~~~~~~
|
|
|
|
|
|
|
|
error: aborting due to 17 previous errors
|
2020-06-09 09:36:01 -05:00
|
|
|
|