2020-06-09 09:36:01 -05:00
|
|
|
error: unnested or-patterns
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/unnested_or_patterns2.rs:12:12
|
2020-06-09 09:36:01 -05:00
|
|
|
|
|
|
|
|
LL | if let Some(Some(0)) | Some(Some(1)) = None {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= note: `-D clippy::unnested-or-patterns` implied by `-D warnings`
|
2023-08-01 07:02:21 -05:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::unnested_or_patterns)]`
|
2020-06-09 09:36:01 -05:00
|
|
|
help: nest the patterns
|
|
|
|
|
|
|
|
|
LL | if let Some(Some(0 | 1)) = None {}
|
2021-08-11 09:21:33 -05:00
|
|
|
| ~~~~~~~~~~~~~~~~~
|
2020-06-09 09:36:01 -05:00
|
|
|
|
|
|
|
error: unnested or-patterns
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/unnested_or_patterns2.rs:13:12
|
2020-06-09 09:36:01 -05:00
|
|
|
|
|
|
|
|
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 {}
|
2021-08-11 09:21:33 -05:00
|
|
|
| ~~~~~~~~~~~~~~~~~~~~~
|
2020-06-09 09:36:01 -05:00
|
|
|
|
|
|
|
error: unnested or-patterns
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/unnested_or_patterns2.rs:14:12
|
2020-06-09 09:36:01 -05:00
|
|
|
|
|
|
|
|
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 {}
|
2021-08-11 09:21:33 -05:00
|
|
|
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
2020-06-09 09:36:01 -05:00
|
|
|
|
|
|
|
error: unnested or-patterns
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/unnested_or_patterns2.rs:15:12
|
2020-06-09 09:36:01 -05:00
|
|
|
|
|
|
|
|
LL | if let Some(Some(0) | Some(1 | 2)) = None {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: nest the patterns
|
|
|
|
|
|
|
|
|
LL | if let Some(Some(0 | 1 | 2)) = None {}
|
2021-08-11 09:21:33 -05:00
|
|
|
| ~~~~~~~~~~~~~~~~~~~~~
|
2020-06-09 09:36:01 -05:00
|
|
|
|
|
|
|
error: unnested or-patterns
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/unnested_or_patterns2.rs:16:12
|
2020-06-09 09:36:01 -05:00
|
|
|
|
|
|
|
|
LL | if let ((0,),) | ((1,) | (2,),) = ((0,),) {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: nest the patterns
|
|
|
|
|
|
|
|
|
LL | if let ((0 | 1 | 2,),) = ((0,),) {}
|
2021-08-11 09:21:33 -05:00
|
|
|
| ~~~~~~~~~~~~~~~
|
2020-06-09 09:36:01 -05:00
|
|
|
|
|
|
|
error: unnested or-patterns
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/unnested_or_patterns2.rs:17:12
|
2020-06-09 09:36:01 -05:00
|
|
|
|
|
|
|
|
LL | if let 0 | (1 | 2) = 0 {}
|
|
|
|
| ^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: nest the patterns
|
|
|
|
|
|
|
|
|
LL | if let 0 | 1 | 2 = 0 {}
|
2021-08-11 09:21:33 -05:00
|
|
|
| ~~~~~~~~~
|
2020-06-09 09:36:01 -05:00
|
|
|
|
|
|
|
error: unnested or-patterns
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/unnested_or_patterns2.rs:18:12
|
2020-06-09 09:36:01 -05:00
|
|
|
|
|
|
|
|
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) {}
|
2021-08-11 09:21:33 -05:00
|
|
|
| ~~~~~~~~~~~~~~~~~~~~~~~
|
2020-06-09 09:36:01 -05:00
|
|
|
|
|
|
|
error: unnested or-patterns
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/unnested_or_patterns2.rs:19:12
|
2020-06-09 09:36:01 -05:00
|
|
|
|
|
|
|
|
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)) {}
|
2021-08-11 09:21:33 -05:00
|
|
|
| ~~~~~~~~~~~~~~~~~~~
|
2020-06-09 09:36:01 -05:00
|
|
|
|
|
|
|
error: aborting due to 8 previous errors
|
|
|
|
|