File tree Expand file tree Collapse file tree 3 files changed +24
-1
lines changed Expand file tree Collapse file tree 3 files changed +24
-1
lines changed Original file line number Diff line number Diff line change 2
2
refs/heads/master: 61b1875c16de39c166b0f4d54bba19f9c6777d1a
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
4
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
5
- refs/heads/try: a0a230de83b2c5e56aa658526c95622c7f4a3891
5
+ refs/heads/try: 813c41362b3588ab336b57ac6e2f1e0eb3f305e2
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
Original file line number Diff line number Diff line change
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
+ }
Original file line number Diff line number Diff line change
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
+ }
You can’t perform that action at this time.
0 commit comments