]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/closures/2229_closure_analysis/match/non-exhaustive-match.stderr
When finding a match expr with a single arm that requires more, suggest it
[rust.git] / src / test / ui / closures / 2229_closure_analysis / match / non-exhaustive-match.stderr
index 7d21dfe1aad64df1c379040cfa5415769655888d..4e5fdbc3d5fbab9fc93b2ef2fb394877741fd87d 100644 (file)
@@ -11,7 +11,10 @@ LL |     let _b = || { match l1 { L1::A => () } };
    |                         ^^ pattern `B` not covered
    |
    = note: the matched value is of type `L1`
-   = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
+help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
+   |
+LL |     let _b = || { match l1 { L1::A => (), B => todo!() } };
+   |                                         ++++++++++++++
 
 error[E0004]: non-exhaustive patterns: type `E1` is non-empty
   --> $DIR/non-exhaustive-match.rs:37:25