]> git.lizzy.rs Git - rust.git/blob - tests/ui/infallible_destructuring_match.stderr
Adapt the *.stderr files of the ui-tests to the tool_lints
[rust.git] / 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:18:5
3    |
4 18 | /     let data = match wrapper {
5 19 | |         SingleVariantEnum::Variant(i) => i,
6 20 | |     };
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:39:5
13    |
14 39 | /     let data = match wrapper {
15 40 | |         TupleStruct(i) => i,
16 41 | |     };
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:60:5
21    |
22 60 | /     let data = match wrapper {
23 61 | |         Ok(i) => i,
24 62 | |     };
25    | |______^ help: try this: `let Ok(data) = wrapper;`
26
27 error: aborting due to 3 previous errors
28