]> git.proxmox.com Git - rustc.git/blobdiff - src/doc/book/listings/ch06-enums-and-pattern-matching/no-listing-10-non-exhaustive-match/output.txt
New upstream version 1.63.0+dfsg1
[rustc.git] / src / doc / book / listings / ch06-enums-and-pattern-matching / no-listing-10-non-exhaustive-match / output.txt
index 8054e7dfa582b9c3eec089b87c70b4ee2c0e578a..c5a6c51bbfab66abed4e79acce8544ea986bc91b 100644 (file)
@@ -6,8 +6,13 @@ error[E0004]: non-exhaustive patterns: `None` not covered
 3   |         match x {
     |               ^ pattern `None` not covered
     |
-    = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
+note: `Option<i32>` defined here
     = note: the matched value is of type `Option<i32>`
+help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
+    |
+4   ~             Some(i) => Some(i + 1),
+5   ~             None => todo!(),
+    |
 
 For more information about this error, try `rustc --explain E0004`.
 error: could not compile `enums` due to previous error