summaryrefslogtreecommitdiffstats
path: root/src/test/ui/pattern/usefulness/non-exhaustive-defined-here.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:03:36 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:03:36 +0000
commit17d40c6057c88f4c432b0d7bac88e1b84cb7e67f (patch)
tree3f66c4a5918660bb8a758ab6cda5ff8ee4f6cdcd /src/test/ui/pattern/usefulness/non-exhaustive-defined-here.rs
parentAdding upstream version 1.64.0+dfsg1. (diff)
downloadrustc-f7f0cc2a5d72e2c61c1f6900e70eec992bea4273.tar.xz
rustc-f7f0cc2a5d72e2c61c1f6900e70eec992bea4273.zip
Adding upstream version 1.65.0+dfsg1.upstream/1.65.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/ui/pattern/usefulness/non-exhaustive-defined-here.rs')
-rw-r--r--src/test/ui/pattern/usefulness/non-exhaustive-defined-here.rs32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/test/ui/pattern/usefulness/non-exhaustive-defined-here.rs b/src/test/ui/pattern/usefulness/non-exhaustive-defined-here.rs
index 2e15bc2d2..af42fc1ae 100644
--- a/src/test/ui/pattern/usefulness/non-exhaustive-defined-here.rs
+++ b/src/test/ui/pattern/usefulness/non-exhaustive-defined-here.rs
@@ -35,43 +35,43 @@ enum E {
fn by_val(e: E) {
let e1 = e.clone();
- match e1 { //~ ERROR non-exhaustive patterns: `B` and `C` not covered
- //~^ NOTE patterns `B` and `C` not covered
+ match e1 { //~ ERROR non-exhaustive patterns: `E::B` and `E::C` not covered
+ //~^ NOTE patterns `E::B` and `E::C` not covered
//~| NOTE the matched value is of type `E`
E::A => {}
}
- let E::A = e; //~ ERROR refutable pattern in local binding: `B` and `C` not covered
- //~^ NOTE patterns `B` and `C` not covered
+ let E::A = e; //~ ERROR refutable pattern in local binding: `E::B` and `E::C` not covered
+ //~^ NOTE patterns `E::B` and `E::C` not covered
//~| NOTE `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with
//~| NOTE for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
//~| NOTE the matched value is of type `E`
}
fn by_ref_once(e: &E) {
- match e { //~ ERROR non-exhaustive patterns: `&B` and `&C` not covered
- //~^ NOTE patterns `&B` and `&C` not covered
+ match e { //~ ERROR non-exhaustive patterns: `&E::B` and `&E::C` not covered
+ //~^ NOTE patterns `&E::B` and `&E::C` not covered
//~| NOTE the matched value is of type `&E`
E::A => {}
}
- let E::A = e; //~ ERROR refutable pattern in local binding: `&B` and `&C` not covered
- //~^ NOTE patterns `&B` and `&C` not covered
+ let E::A = e; //~ ERROR refutable pattern in local binding: `&E::B` and `&E::C` not covered
+ //~^ NOTE patterns `&E::B` and `&E::C` not covered
//~| NOTE `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with
//~| NOTE for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
//~| NOTE the matched value is of type `&E`
}
fn by_ref_thrice(e: & &mut &E) {
- match e { //~ ERROR non-exhaustive patterns: `&&mut &B` and `&&mut &C` not covered
- //~^ NOTE patterns `&&mut &B` and `&&mut &C` not covered
+ match e { //~ ERROR non-exhaustive patterns: `&&mut &E::B` and `&&mut &E::C` not covered
+ //~^ NOTE patterns `&&mut &E::B` and `&&mut &E::C` not covered
//~| NOTE the matched value is of type `&&mut &E`
E::A => {}
}
let E::A = e;
- //~^ ERROR refutable pattern in local binding: `&&mut &B` and `&&mut &C` not covered
- //~| NOTE patterns `&&mut &B` and `&&mut &C` not covered
+ //~^ ERROR refutable pattern in local binding: `&&mut &E::B` and `&&mut &E::C` not covered
+ //~| NOTE patterns `&&mut &E::B` and `&&mut &E::C` not covered
//~| NOTE `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with
//~| NOTE for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
//~| NOTE the matched value is of type `&&mut &E`
@@ -89,15 +89,15 @@ enum Opt {
}
fn ref_pat(e: Opt) {
- match e {//~ ERROR non-exhaustive patterns: `None` not covered
- //~^ NOTE pattern `None` not covered
+ match e {//~ ERROR non-exhaustive patterns: `Opt::None` not covered
+ //~^ NOTE pattern `Opt::None` not covered
//~| NOTE the matched value is of type `Opt`
Opt::Some(ref _x) => {}
}
- let Opt::Some(ref _x) = e; //~ ERROR refutable pattern in local binding: `None` not covered
+ let Opt::Some(ref _x) = e; //~ ERROR refutable pattern in local binding: `Opt::None` not covered
//~^ NOTE the matched value is of type `Opt`
- //~| NOTE pattern `None` not covered
+ //~| NOTE pattern `Opt::None` not covered
//~| NOTE `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with
//~| NOTE for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
}