]>
Commit | Line | Data |
---|---|---|
f20569fa | 1 | error: you seem to be trying to use `match` to destructure a single infallible pattern. Consider using `let` |
487cf647 | 2 | --> $DIR/infallible_destructuring_match.rs:29:5 |
f20569fa XL |
3 | | |
4 | LL | / let data = match wrapper { | |
5 | LL | | SingleVariantEnum::Variant(i) => i, | |
6 | LL | | }; | |
7 | | |______^ help: try this: `let SingleVariantEnum::Variant(data) = wrapper;` | |
8 | | | |
9 | = note: `-D clippy::infallible-destructuring-match` implied by `-D warnings` | |
10 | ||
11 | error: you seem to be trying to use `match` to destructure a single infallible pattern. Consider using `let` | |
487cf647 | 12 | --> $DIR/infallible_destructuring_match.rs:61:5 |
f20569fa XL |
13 | | |
14 | LL | / let data = match wrapper { | |
15 | LL | | TupleStruct(i) => i, | |
16 | LL | | }; | |
17 | | |______^ help: try this: `let TupleStruct(data) = wrapper;` | |
18 | ||
19 | error: you seem to be trying to use `match` to destructure a single infallible pattern. Consider using `let` | |
487cf647 FG |
20 | --> $DIR/infallible_destructuring_match.rs:85:5 |
21 | | | |
22 | LL | / let data = match wrapper { | |
23 | LL | | TupleStructWithNonCopy(ref n) => n, | |
24 | LL | | }; | |
25 | | |______^ help: try this: `let TupleStructWithNonCopy(ref data) = wrapper;` | |
26 | ||
27 | error: you seem to be trying to use `match` to destructure a single infallible pattern. Consider using `let` | |
28 | --> $DIR/infallible_destructuring_match.rs:104:5 | |
f20569fa XL |
29 | | |
30 | LL | / let data = match wrapper { | |
31 | LL | | Ok(i) => i, | |
32 | LL | | }; | |
33 | | |______^ help: try this: `let Ok(data) = wrapper;` | |
34 | ||
487cf647 | 35 | error: aborting due to 4 previous errors |
f20569fa | 36 |