diff options
Diffstat (limited to '')
-rw-r--r-- | tests/ui/uninhabited/uninhabited-matches-feature-gated.stderr (renamed from src/test/ui/uninhabited/uninhabited-matches-feature-gated.stderr) | 30 |
1 files changed, 6 insertions, 24 deletions
diff --git a/src/test/ui/uninhabited/uninhabited-matches-feature-gated.stderr b/tests/ui/uninhabited/uninhabited-matches-feature-gated.stderr index c78829634..466d7f2ea 100644 --- a/src/test/ui/uninhabited/uninhabited-matches-feature-gated.stderr +++ b/tests/ui/uninhabited/uninhabited-matches-feature-gated.stderr @@ -6,12 +6,9 @@ LL | let _ = match x { | note: `Result<u32, &Void>` defined here --> $SRC_DIR/core/src/result.rs:LL:COL + ::: $SRC_DIR/core/src/result.rs:LL:COL | -LL | pub enum Result<T, E> { - | --------------------- -... -LL | Err(#[stable(feature = "rust1", since = "1.0.0")] E), - | ^^^ not covered + = note: not covered = note: the matched value is of type `Result<u32, &Void>` help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown | @@ -88,12 +85,9 @@ LL | let _ = match x { | note: `Result<u32, Void>` defined here --> $SRC_DIR/core/src/result.rs:LL:COL + ::: $SRC_DIR/core/src/result.rs:LL:COL | -LL | pub enum Result<T, E> { - | --------------------- -... -LL | Err(#[stable(feature = "rust1", since = "1.0.0")] E), - | ^^^ not covered + = note: not covered = note: the matched value is of type `Result<u32, Void>` help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown | @@ -101,7 +95,7 @@ LL ~ Ok(x) => x, LL ~ Err(_) => todo!(), | -error[E0005]: refutable pattern in local binding: `Err(_)` not covered +error[E0005]: refutable pattern in local binding --> $DIR/uninhabited-matches-feature-gated.rs:37:9 | LL | let Ok(x) = x; @@ -109,20 +103,8 @@ LL | let Ok(x) = x; | = 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: `Result<u32, Void>` defined here - --> $SRC_DIR/core/src/result.rs:LL:COL - | -LL | pub enum Result<T, E> { - | --------------------- -... -LL | Err(#[stable(feature = "rust1", since = "1.0.0")] E), - | ^^^ not covered = note: the matched value is of type `Result<u32, Void>` -help: you might want to use `if let` to ignore the variant that isn't matched - | -LL | let x = if let Ok(x) = x { x } else { todo!() }; - | ++++++++++ ++++++++++++++++++++++ -help: alternatively, you might want to use let else to handle the variant that isn't matched +help: you might want to use `let else` to handle the variant that isn't matched | LL | let Ok(x) = x else { todo!() }; | ++++++++++++++++ |