From c7c80577c2a4246311e09af61d8cfe4324ce79ab Mon Sep 17 00:00:00 2001 From: Michael Goulet Date: Wed, 6 Apr 2022 21:43:34 -0700 Subject: [PATCH] regression test for #82866 --- src/test/ui/match/issue-82866.rs | 7 +++++++ src/test/ui/match/issue-82866.stderr | 16 ++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 src/test/ui/match/issue-82866.rs create mode 100644 src/test/ui/match/issue-82866.stderr diff --git a/src/test/ui/match/issue-82866.rs b/src/test/ui/match/issue-82866.rs new file mode 100644 index 0000000000000..95cd62261f109 --- /dev/null +++ b/src/test/ui/match/issue-82866.rs @@ -0,0 +1,7 @@ +fn main() { + match x { + //~^ ERROR cannot find value `x` in this scope + Some::(v) => (), + //~^ ERROR cannot find type `v` in this scope + } +} diff --git a/src/test/ui/match/issue-82866.stderr b/src/test/ui/match/issue-82866.stderr new file mode 100644 index 0000000000000..f9e3360a525ff --- /dev/null +++ b/src/test/ui/match/issue-82866.stderr @@ -0,0 +1,16 @@ +error[E0425]: cannot find value `x` in this scope + --> $DIR/issue-82866.rs:2:11 + | +LL | match x { + | ^ not found in this scope + +error[E0412]: cannot find type `v` in this scope + --> $DIR/issue-82866.rs:4:16 + | +LL | Some::(v) => (), + | ^ not found in this scope + +error: aborting due to 2 previous errors + +Some errors have detailed explanations: E0412, E0425. +For more information about an error, try `rustc --explain E0412`.