Skip to content

Commit 923aa47

Browse files
committed
Test for #924
1 parent 94db38a commit 923aa47

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

src/test/run-pass/unreachable-code.rs

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,26 @@ fn ret_guard() {
3939
}
4040
}
4141

42+
fn rec_ret() { let _r = {c: ret}; }
43+
44+
fn vec_ret() { let _v = [1, 2, ret, 4]; }
45+
4246
fn fail_then_concat() {
4347
let x = [], y = [3];
4448
fail;
4549
x += y;
4650
"good" + "bye";
4751
}
4852

49-
fn main() {}
53+
fn main() {
54+
// Call the functions that don't fail.
55+
rec_ret();
56+
vec_ret();
57+
ret_ret();
58+
log_ret();
59+
call_id_2();
60+
call_id_3();
61+
call_id_4();
62+
bind_id_2();
63+
ret_guard();
64+
}

0 commit comments

Comments
 (0)