File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -365,9 +365,10 @@ fn my_err(s: &str) -> ! {
365
365
```
366
366
367
367
We call such functions "diverging" because they never return a value to the
368
- caller. Every control path in a diverging function must end with a ` panic!() ` or
369
- a call to another diverging function on every control path. The ` ! ` annotation
370
- does * not* denote a type.
368
+ caller. Every control path in a diverging function must end with a ` panic!() ` ,
369
+ a loop expression without an associated break expression, or a call to another
370
+ diverging function on every control path. The ` ! ` annotation does * not* denote
371
+ a type.
371
372
372
373
It might be necessary to declare a diverging function because as mentioned
373
374
previously, the typechecker checks that every control path in a function ends
You can’t perform that action at this time.
0 commit comments