]> git.proxmox.com Git - rustc.git/blame - src/tools/clippy/tests/ui/infallible_destructuring_match.stderr
New upstream version 1.67.1+dfsg1
[rustc.git] / src / tools / clippy / tests / ui / infallible_destructuring_match.stderr
CommitLineData
f20569fa 1error: 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 |
4LL | / let data = match wrapper {
5LL | | SingleVariantEnum::Variant(i) => i,
6LL | | };
7 | |______^ help: try this: `let SingleVariantEnum::Variant(data) = wrapper;`
8 |
9 = note: `-D clippy::infallible-destructuring-match` implied by `-D warnings`
10
11error: 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 |
14LL | / let data = match wrapper {
15LL | | TupleStruct(i) => i,
16LL | | };
17 | |______^ help: try this: `let TupleStruct(data) = wrapper;`
18
19error: 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 |
22LL | / let data = match wrapper {
23LL | | TupleStructWithNonCopy(ref n) => n,
24LL | | };
25 | |______^ help: try this: `let TupleStructWithNonCopy(ref data) = wrapper;`
26
27error: 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 |
30LL | / let data = match wrapper {
31LL | | Ok(i) => i,
32LL | | };
33 | |______^ help: try this: `let Ok(data) = wrapper;`
34
487cf647 35error: aborting due to 4 previous errors
f20569fa 36