We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9d276b1 commit 3d8df99Copy full SHA for 3d8df99
src/test/run-pass/issue-3121.rs
@@ -0,0 +1,18 @@
1
+// xfail-test
2
+enum side { mayo, catsup, vinegar }
3
+enum order { hamburger, fries(side), shake }
4
+enum meal { to_go(order), for_here(order) }
5
+
6
+fn foo(m: @meal, cond: bool) {
7
+ match *m {
8
+ to_go(_) => { }
9
+ for_here(_) if cond => {}
10
+ for_here(hamburger) => {}
11
+ for_here(fries(_s)) => {}
12
+ for_here(shake) => {}
13
+ }
14
+}
15
16
+fn main() {
17
+ foo(@for_here(hamburger), true)
18
src/test/run-pass/issue-3895.rs
@@ -0,0 +1,9 @@
+ enum State { BadChar, BadSyntax }
+ match BadChar {
+ _ if true => BadChar,
+ BadChar | BadSyntax => fail ,
+ };
0 commit comments