Skip to content

Commit 6a66391

Browse files
committed
---
yaml --- r: 1965 b: refs/heads/master c: efb7381 h: refs/heads/master i: 1963: 93312a2 v: v3
1 parent 6a80db4 commit 6a66391

File tree

2 files changed

+32
-1
lines changed

2 files changed

+32
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: dcf04ffbad5f581a8873fd477af83c2814aa7c12
2+
refs/heads/master: efb738153c7248601a9a1b294b0ad8fd9c27023c

trunk/src/test/run-pass/expr-alt.rs

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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+
case (true) {
20+
false
21+
}
22+
case (false) {
23+
true
24+
}
25+
};
26+
check (res);
27+
}
28+
29+
fn main() {
30+
test();
31+
}

0 commit comments

Comments
 (0)