Skip to content

Commit 35e5f03

Browse files
committed
---
yaml --- r: 14792 b: refs/heads/try c: 813c413 h: refs/heads/master v: v3
1 parent 2ec0535 commit 35e5f03

File tree

3 files changed

+24
-1
lines changed

3 files changed

+24
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
refs/heads/master: 61b1875c16de39c166b0f4d54bba19f9c6777d1a
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
5-
refs/heads/try: a0a230de83b2c5e56aa658526c95622c7f4a3891
5+
refs/heads/try: 813c41362b3588ab336b57ac6e2f1e0eb3f305e2
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// error-pattern:some control paths may return
2+
/* Make sure a loop{} with a break in it can't be
3+
the tailexpr in the body of a diverging function */
4+
fn forever() -> ! {
5+
loop {
6+
break;
7+
}
8+
ret 42;
9+
}
10+
11+
fn main() {
12+
if (1 == 2) { forever(); }
13+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/* Make sure a loop{} can be the tailexpr in the body
2+
of a diverging function */
3+
4+
fn forever() -> ! {
5+
loop{}
6+
}
7+
8+
fn main() {
9+
if (1 == 2) { forever(); }
10+
}

0 commit comments

Comments
 (0)