]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/infallible_destructuring_match.stderr
Add 'src/tools/clippy/' from commit 'd2708873ef711ec8ab45df1e984ecf24a96cd369'
[rust.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:26:5
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`
12   --> $DIR/infallible_destructuring_match.rs:58:5
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`
20   --> $DIR/infallible_destructuring_match.rs:90:5
21    |
22 LL | /     let data = match wrapper {
23 LL | |         Ok(i) => i,
24 LL | |     };
25    | |______^ help: try this: `let Ok(data) = wrapper;`
26
27 error: aborting due to 3 previous errors
28