We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dcf04ff commit efb7381Copy full SHA for efb7381
src/test/run-pass/expr-alt.rs
@@ -0,0 +1,31 @@
1
+// xfail-boot
2
+// xfail-stage0
3
+// -*- rust -*-
4
+
5
+// Tests for using alt as an expression
6
7
+fn test() {
8
+ let bool res = alt (true) {
9
+ case (true) {
10
+ true
11
+ }
12
+ case (false) {
13
+ false
14
15
+ };
16
+ check (res);
17
18
+ res = alt(false) {
19
20
21
22
23
24
25
26
27
+}
28
29
+fn main() {
30
+ test();
31
0 commit comments