summaryrefslogtreecommitdiffstats
path: root/src/doc/book/listings/ch18-patterns-and-matching/listing-18-08/output.txt
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:18:21 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:18:21 +0000
commit4e8199b572f2035b7749cba276ece3a26630d23e (patch)
treef09feeed6a0fe39d027b1908aa63ea6b35e4b631 /src/doc/book/listings/ch18-patterns-and-matching/listing-18-08/output.txt
parentAdding upstream version 1.66.0+dfsg1. (diff)
downloadrustc-4e8199b572f2035b7749cba276ece3a26630d23e.tar.xz
rustc-4e8199b572f2035b7749cba276ece3a26630d23e.zip
Adding upstream version 1.67.1+dfsg1.upstream/1.67.1+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/doc/book/listings/ch18-patterns-and-matching/listing-18-08/output.txt')
-rw-r--r--src/doc/book/listings/ch18-patterns-and-matching/listing-18-08/output.txt22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/doc/book/listings/ch18-patterns-and-matching/listing-18-08/output.txt b/src/doc/book/listings/ch18-patterns-and-matching/listing-18-08/output.txt
index 72274d07c..0fd5373b8 100644
--- a/src/doc/book/listings/ch18-patterns-and-matching/listing-18-08/output.txt
+++ b/src/doc/book/listings/ch18-patterns-and-matching/listing-18-08/output.txt
@@ -1,19 +1,19 @@
$ cargo run
Compiling patterns v0.1.0 (file:///projects/patterns)
error[E0005]: refutable pattern in local binding: `None` not covered
- --> src/main.rs:3:9
- |
-3 | let Some(x) = some_option_value;
- | ^^^^^^^ pattern `None` not covered
- |
- = note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
- = note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
+ --> src/main.rs:3:9
+ |
+3 | let Some(x) = some_option_value;
+ | ^^^^^^^ pattern `None` not covered
+ |
+ = note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
+ = note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
note: `Option<i32>` defined here
- = note: the matched value is of type `Option<i32>`
+ = note: the matched value is of type `Option<i32>`
help: you might want to use `if let` to ignore the variant that isn't matched
- |
-3 | let x = if let Some(x) = some_option_value { x } else { todo!() };
- | ++++++++++ ++++++++++++++++++++++
+ |
+3 | let x = if let Some(x) = some_option_value { x } else { todo!() };
+ | ++++++++++ ++++++++++++++++++++++
For more information about this error, try `rustc --explain E0005`.
error: could not compile `patterns` due to previous error