fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error: 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 | 4LL | / let data = match wrapper { 5LL | | SingleVariantEnum::Variant(i) => i, 6LL | | }; 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 12error: 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 | 15LL | / let data = match wrapper { 16LL | | TupleStruct(i) => i, 17LL | | }; 18 | |______^ help: try: `let TupleStruct(data) = wrapper;` 19 20error: 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 | 23LL | / let data = match wrapper { 24LL | | TupleStructWithNonCopy(ref n) => n, 25LL | | }; 26 | |______^ help: try: `let TupleStructWithNonCopy(ref data) = wrapper;` 27 28error: 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 | 31LL | / let data = match wrapper { 32LL | | Ok(i) => i, 33LL | | }; 34 | |______^ help: try: `let Ok(data) = wrapper;` 35 36error: aborting due to 4 previous errors 37