]> git.proxmox.com Git - rustc.git/blob - src/tools/clippy/tests/ui/infallible_destructuring_match.stderr
New upstream version 1.74.1+dfsg1
[rustc.git] / src / tools / clippy / tests / ui / infallible_destructuring_match.stderr
1 error: you seem to be trying to use `match` to destructure a single infallible pattern. Consider using `let`
2 --> $DIR/infallible_destructuring_match.rs:28:5
3 |
4 LL | / let data = match wrapper {
5 LL | | SingleVariantEnum::Variant(i) => i,
6 LL | | };
7 | |______^ help: try: `let SingleVariantEnum::Variant(data) = wrapper;`
8 |
9 = note: `-D clippy::infallible-destructuring-match` implied by `-D warnings`
10 = help: to override `-D warnings` add `#[allow(clippy::infallible_destructuring_match)]`
11
12 error: you seem to be trying to use `match` to destructure a single infallible pattern. Consider using `let`
13 --> $DIR/infallible_destructuring_match.rs:60:5
14 |
15 LL | / let data = match wrapper {
16 LL | | TupleStruct(i) => i,
17 LL | | };
18 | |______^ help: try: `let TupleStruct(data) = wrapper;`
19
20 error: you seem to be trying to use `match` to destructure a single infallible pattern. Consider using `let`
21 --> $DIR/infallible_destructuring_match.rs:84:5
22 |
23 LL | / let data = match wrapper {
24 LL | | TupleStructWithNonCopy(ref n) => n,
25 LL | | };
26 | |______^ help: try: `let TupleStructWithNonCopy(ref data) = wrapper;`
27
28 error: you seem to be trying to use `match` to destructure a single infallible pattern. Consider using `let`
29 --> $DIR/infallible_destructuring_match.rs:103:5
30 |
31 LL | / let data = match wrapper {
32 LL | | Ok(i) => i,
33 LL | | };
34 | |______^ help: try: `let Ok(data) = wrapper;`
35
36 error: aborting due to 4 previous errors
37