]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/consts/const-match-pattern-arm.rs
Rollup merge of #98609 - TaKO8Ki:fix-ice-for-associated-constant-generics, r=lcnr
[rust.git] / src / test / ui / consts / const-match-pattern-arm.rs
index 0482f7f7daeab9db9b0df82c46961b40f9f638d5..90680c0194c554735b1cfd9043d5c7c7e020e96a 100644 (file)
@@ -1,12 +1,12 @@
-#![allow(warnings)]
+// check-pass
 
-const x: bool = match Some(true) { //~ ERROR `match` is not allowed in a `const`
+const _: bool = match Some(true) {
     Some(value) => true,
     _ => false
 };
 
-const y: bool = {
-    match Some(true) { //~ ERROR `match` is not allowed in a `const`
+const _: bool = {
+    match Some(true) {
         Some(value) => true,
         _ => false
     }