mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-17 10:18:20 +00:00
268 lines
6.8 KiB
Text
268 lines
6.8 KiB
Text
|
error: unnested or-patterns
|
||
|
--> $DIR/unnested_or_patterns.rs:10:12
|
||
|
|
|
||
|
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) {}
|
||
|
| ^^^^^^^^^^^
|
||
|
|
||
|
error: unnested or-patterns
|
||
|
--> $DIR/unnested_or_patterns.rs:11:12
|
||
|
|
|
||
|
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) {}
|
||
|
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||
|
|
||
|
error: unnested or-patterns
|
||
|
--> $DIR/unnested_or_patterns.rs:13:12
|
||
|
|
|
||
|
LL | if let &0 | C0 | &2 = &0 {}
|
||
|
| ^^^^^^^^^^^^
|
||
|
|
|
||
|
help: nest the patterns
|
||
|
|
|
||
|
LL | if let &(0 | 2) | C0 = &0 {}
|
||
|
| ^^^^^^^^^^^^^
|
||
|
|
||
|
error: unnested or-patterns
|
||
|
--> $DIR/unnested_or_patterns.rs:14:12
|
||
|
|
|
||
|
LL | if let &mut 0 | &mut 2 = &mut 0 {}
|
||
|
| ^^^^^^^^^^^^^^^
|
||
|
|
|
||
|
help: nest the patterns
|
||
|
|
|
||
|
LL | if let &mut (0 | 2) = &mut 0 {}
|
||
|
| ^^^^^^^^^^^^
|
||
|
|
||
|
error: unnested or-patterns
|
||
|
--> $DIR/unnested_or_patterns.rs:15:12
|
||
|
|
|
||
|
LL | if let x @ 0 | x @ 2 = 0 {}
|
||
|
| ^^^^^^^^^^^^^
|
||
|
|
|
||
|
help: nest the patterns
|
||
|
|
|
||
|
LL | if let x @ (0 | 2) = 0 {}
|
||
|
| ^^^^^^^^^^^
|
||
|
|
||
|
error: unnested or-patterns
|
||
|
--> $DIR/unnested_or_patterns.rs:16:12
|
||
|
|
|
||
|
LL | if let (0, 1) | (0, 2) | (0, 3) = (0, 0) {}
|
||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||
|
|
|
||
|
help: nest the patterns
|
||
|
|
|
||
|
LL | if let (0, 1 | 2 | 3) = (0, 0) {}
|
||
|
| ^^^^^^^^^^^^^^
|
||
|
|
||
|
error: unnested or-patterns
|
||
|
--> $DIR/unnested_or_patterns.rs:17:12
|
||
|
|
|
||
|
LL | if let (1, 0) | (2, 0) | (3, 0) = (0, 0) {}
|
||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||
|
|
|
||
|
help: nest the patterns
|
||
|
|
|
||
|
LL | if let (1 | 2 | 3, 0) = (0, 0) {}
|
||
|
| ^^^^^^^^^^^^^^
|
||
|
|
||
|
error: unnested or-patterns
|
||
|
--> $DIR/unnested_or_patterns.rs:18:12
|
||
|
|
|
||
|
LL | if let (x, ..) | (x, 1) | (x, 2) = (0, 1) {}
|
||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||
|
|
|
||
|
help: nest the patterns
|
||
|
|
|
||
|
LL | if let (x, ..) | (x, 1 | 2) = (0, 1) {}
|
||
|
| ^^^^^^^^^^^^^^^^^^^^
|
||
|
|
||
|
error: unnested or-patterns
|
||
|
--> $DIR/unnested_or_patterns.rs:19:12
|
||
|
|
|
||
|
LL | if let [0] | [1] = [0] {}
|
||
|
| ^^^^^^^^^
|
||
|
|
|
||
|
help: nest the patterns
|
||
|
|
|
||
|
LL | if let [0 | 1] = [0] {}
|
||
|
| ^^^^^^^
|
||
|
|
||
|
error: unnested or-patterns
|
||
|
--> $DIR/unnested_or_patterns.rs:20:12
|
||
|
|
|
||
|
LL | if let [x, 0] | [x, 1] = [0, 1] {}
|
||
|
| ^^^^^^^^^^^^^^^
|
||
|
|
|
||
|
help: nest the patterns
|
||
|
|
|
||
|
LL | if let [x, 0 | 1] = [0, 1] {}
|
||
|
| ^^^^^^^^^^
|
||
|
|
||
|
error: unnested or-patterns
|
||
|
--> $DIR/unnested_or_patterns.rs:21:12
|
||
|
|
|
||
|
LL | if let [x, 0] | [x, 1] | [x, 2] = [0, 1] {}
|
||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||
|
|
|
||
|
help: nest the patterns
|
||
|
|
|
||
|
LL | if let [x, 0 | 1 | 2] = [0, 1] {}
|
||
|
| ^^^^^^^^^^^^^^
|
||
|
|
||
|
error: unnested or-patterns
|
||
|
--> $DIR/unnested_or_patterns.rs:22:12
|
||
|
|
|
||
|
LL | if let [x, ..] | [x, 1] | [x, 2] = [0, 1] {}
|
||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||
|
|
|
||
|
help: nest the patterns
|
||
|
|
|
||
|
LL | if let [x, ..] | [x, 1 | 2] = [0, 1] {}
|
||
|
| ^^^^^^^^^^^^^^^^^^^^
|
||
|
|
||
|
error: unnested or-patterns
|
||
|
--> $DIR/unnested_or_patterns.rs:24:12
|
||
|
|
|
||
|
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) {}
|
||
|
| ^^^^^^^^^^^^
|
||
|
|
||
|
error: unnested or-patterns
|
||
|
--> $DIR/unnested_or_patterns.rs:25:12
|
||
|
|
|
||
|
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) {}
|
||
|
| ^^^^^^^^^^^^^^^^
|
||
|
|
||
|
error: unnested or-patterns
|
||
|
--> $DIR/unnested_or_patterns.rs:26:12
|
||
|
|
|
||
|
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) {}
|
||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||
|
|
||
|
error: unnested or-patterns
|
||
|
--> $DIR/unnested_or_patterns.rs:31:12
|
||
|
|
|
||
|
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 }) {}
|
||
|
| ^^^^^^^^^^^^^^^^^
|
||
|
|
||
|
error: unnested or-patterns
|
||
|
--> $DIR/unnested_or_patterns.rs:33:12
|
||
|
|
|
||
|
LL | if let Some(Some(0)) | Some(Some(1)) = None {}
|
||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||
|
|
|
||
|
help: nest the patterns
|
||
|
|
|
||
|
LL | if let Some(Some(0 | 1)) = None {}
|
||
|
| ^^^^^^^^^^^^^^^^^
|
||
|
|
||
|
error: unnested or-patterns
|
||
|
--> $DIR/unnested_or_patterns.rs:34:12
|
||
|
|
|
||
|
LL | if let Some(Some(0)) | Some(Some(1) | Some(2)) = None {}
|
||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||
|
|
|
||
|
help: nest the patterns
|
||
|
|
|
||
|
LL | if let Some(Some(0 | 1 | 2)) = None {}
|
||
|
| ^^^^^^^^^^^^^^^^^^^^^
|
||
|
|
||
|
error: unnested or-patterns
|
||
|
--> $DIR/unnested_or_patterns.rs:35:12
|
||
|
|
|
||
|
LL | if let Some(Some(0 | 1) | Some(2)) | Some(Some(3) | Some(4)) = None {}
|
||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||
|
|
|
||
|
help: nest the patterns
|
||
|
|
|
||
|
LL | if let Some(Some(0 | 1 | 2 | 3 | 4)) = None {}
|
||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||
|
|
||
|
error: unnested or-patterns
|
||
|
--> $DIR/unnested_or_patterns.rs:36:12
|
||
|
|
|
||
|
LL | if let Some(Some(0) | Some(1 | 2)) = None {}
|
||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||
|
|
|
||
|
help: nest the patterns
|
||
|
|
|
||
|
LL | if let Some(Some(0 | 1 | 2)) = None {}
|
||
|
| ^^^^^^^^^^^^^^^^^^^^^
|
||
|
|
||
|
error: unnested or-patterns
|
||
|
--> $DIR/unnested_or_patterns.rs:37:12
|
||
|
|
|
||
|
LL | if let ((0,),) | ((1,) | (2,),) = ((0,),) {}
|
||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||
|
|
|
||
|
help: nest the patterns
|
||
|
|
|
||
|
LL | if let ((0 | 1 | 2,),) = ((0,),) {}
|
||
|
| ^^^^^^^^^^^^^^^
|
||
|
|
||
|
error: unnested or-patterns
|
||
|
--> $DIR/unnested_or_patterns.rs:38:12
|
||
|
|
|
||
|
LL | if let 0 | (1 | 2) = 0 {}
|
||
|
| ^^^^^^^^^^^
|
||
|
|
|
||
|
help: nest the patterns
|
||
|
|
|
||
|
LL | if let 0 | 1 | 2 = 0 {}
|
||
|
| ^^^^^^^^^
|
||
|
|
||
|
error: unnested or-patterns
|
||
|
--> $DIR/unnested_or_patterns.rs:39:12
|
||
|
|
|
||
|
LL | if let box (0 | 1) | (box 2 | box (3 | 4)) = Box::new(0) {}
|
||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||
|
|
|
||
|
help: nest the patterns
|
||
|
|
|
||
|
LL | if let box (0 | 1 | 2 | 3 | 4) = Box::new(0) {}
|
||
|
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||
|
|
||
|
error: unnested or-patterns
|
||
|
--> $DIR/unnested_or_patterns.rs:40:12
|
||
|
|
|
||
|
LL | if let box box 0 | box (box 2 | box 4) = Box::new(Box::new(0)) {}
|
||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||
|
|
|
||
|
help: nest the patterns
|
||
|
|
|
||
|
LL | if let box box (0 | 2 | 4) = Box::new(Box::new(0)) {}
|
||
|
| ^^^^^^^^^^^^^^^^^^^
|
||
|
|
||
|
error: aborting due to 24 previous errors
|
||
|
|