From 17d40c6057c88f4c432b0d7bac88e1b84cb7e67f Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:03:36 +0200 Subject: Adding upstream version 1.65.0+dfsg1. Signed-off-by: Daniel Baumann --- src/test/ui/uninhabited/uninhabited-irrefutable.rs | 2 +- src/test/ui/uninhabited/uninhabited-irrefutable.stderr | 6 +++--- src/test/ui/uninhabited/uninhabited-matches-feature-gated.stderr | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/test/ui/uninhabited') diff --git a/src/test/ui/uninhabited/uninhabited-irrefutable.rs b/src/test/ui/uninhabited/uninhabited-irrefutable.rs index 661b5486a..1a0f3c5e5 100644 --- a/src/test/ui/uninhabited/uninhabited-irrefutable.rs +++ b/src/test/ui/uninhabited/uninhabited-irrefutable.rs @@ -24,5 +24,5 @@ enum Foo { fn main() { let x: Foo = Foo::D(123, 456); - let Foo::D(_y, _z) = x; //~ ERROR refutable pattern in local binding: `A(_)` not covered + let Foo::D(_y, _z) = x; //~ ERROR refutable pattern in local binding: `Foo::A(_)` not covered } diff --git a/src/test/ui/uninhabited/uninhabited-irrefutable.stderr b/src/test/ui/uninhabited/uninhabited-irrefutable.stderr index c571e17a7..32f287a18 100644 --- a/src/test/ui/uninhabited/uninhabited-irrefutable.stderr +++ b/src/test/ui/uninhabited/uninhabited-irrefutable.stderr @@ -1,8 +1,8 @@ -error[E0005]: refutable pattern in local binding: `A(_)` not covered +error[E0005]: refutable pattern in local binding: `Foo::A(_)` not covered --> $DIR/uninhabited-irrefutable.rs:27:9 | LL | let Foo::D(_y, _z) = x; - | ^^^^^^^^^^^^^^ pattern `A(_)` not covered + | ^^^^^^^^^^^^^^ pattern `Foo::A(_)` 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 @@ -18,7 +18,7 @@ help: you might want to use `if let` to ignore the variant that isn't matched | LL | let (_y, _z) = if let Foo::D(_y, _z) = x { (_y, _z) } else { todo!() }; | +++++++++++++++++ +++++++++++++++++++++++++++++ -help: alternatively, on nightly, you might want to use `#![feature(let_else)]` to handle the variant that isn't matched +help: alternatively, you might want to use let else to handle the variant that isn't matched | LL | let Foo::D(_y, _z) = x else { todo!() }; | ++++++++++++++++ diff --git a/src/test/ui/uninhabited/uninhabited-matches-feature-gated.stderr b/src/test/ui/uninhabited/uninhabited-matches-feature-gated.stderr index 2c107b1f7..c78829634 100644 --- a/src/test/ui/uninhabited/uninhabited-matches-feature-gated.stderr +++ b/src/test/ui/uninhabited/uninhabited-matches-feature-gated.stderr @@ -122,7 +122,7 @@ 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, on nightly, you might want to use `#![feature(let_else)]` to handle the variant that isn't matched +help: alternatively, you might want to use let else to handle the variant that isn't matched | LL | let Ok(x) = x else { todo!() }; | ++++++++++++++++ -- cgit v1.2.3