summaryrefslogtreecommitdiffstats
path: root/src/test/ui/consts/control-flow/exhaustive-c-like-enum-match.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
commit218caa410aa38c29984be31a5229b9fa717560ee (patch)
treec54bd55eeb6e4c508940a30e94c0032fbd45d677 /src/test/ui/consts/control-flow/exhaustive-c-like-enum-match.rs
parentReleasing progress-linux version 1.67.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-218caa410aa38c29984be31a5229b9fa717560ee.tar.xz
rustc-218caa410aa38c29984be31a5229b9fa717560ee.zip
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/ui/consts/control-flow/exhaustive-c-like-enum-match.rs')
-rw-r--r--src/test/ui/consts/control-flow/exhaustive-c-like-enum-match.rs29
1 files changed, 0 insertions, 29 deletions
diff --git a/src/test/ui/consts/control-flow/exhaustive-c-like-enum-match.rs b/src/test/ui/consts/control-flow/exhaustive-c-like-enum-match.rs
deleted file mode 100644
index 4320133df..000000000
--- a/src/test/ui/consts/control-flow/exhaustive-c-like-enum-match.rs
+++ /dev/null
@@ -1,29 +0,0 @@
-// Test for <https://github.com/rust-lang/rust/issues/66756>
-
-// check-pass
-
-enum E {
- A,
- B,
- C
-}
-
-const fn f(e: E) {
- match e {
- E::A => {}
- E::B => {}
- E::C => {}
- }
-}
-
-const fn g(e: E) -> usize {
- match e {
- _ => 0
- }
-}
-
-fn main() {
- const X: usize = g(E::C);
- assert_eq!(X, 0);
- assert_eq!(g(E::A), 0);
-}