mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 08:13:41 +00:00
commit
3161cb096f
@ -1255,9 +1255,7 @@ fn my_err(s: &str) -> ! {
|
||||
We call such functions "diverging" because they never return a value to the
|
||||
caller. Every control path in a diverging function must end with a `panic!()` or
|
||||
a call to another diverging function on every control path. The `!` annotation
|
||||
does *not* denote a type. Rather, the result type of a diverging function is a
|
||||
special type called ⊥ ("bottom") that unifies with any type. Rust has no
|
||||
syntax for ⊥.
|
||||
does *not* denote a type.
|
||||
|
||||
It might be necessary to declare a diverging function because as mentioned
|
||||
previously, the typechecker checks that every control path in a function ends
|
||||
|
Loading…
Reference in New Issue
Block a user