[$] Stabilizing Rust's never type (lwn.net)
<p>
A function's return type is supposed to indicate the kind of data that it
produces.
Rust's "never" type, which is
<a href="https://doc.rust-lang.org/stable/std/primitive.never.html">
denoted by an exclamation mark</a> ("<tt>!</tt>"), is the type the language uses to mark
a function that never returns and other places where a value can never occur. For
a long time, the never type was used internally by the compiler, but was
considered an unstable feature. On
<a href="https://github.com/rust-lang/rust/pull/155499">
August 24</a>, after more than two years of work,
Rust-compiler-contributor "waffle" finally managed to stabilize the type. It
took so long, in part, because it involved a small breaking
change to previous Rust editions, which the compiler maintainers needed to
ensure did not impact much real code.
</p>
A function's return type is supposed to indicate the kind of data that it
produces.
Rust's "never" type, which is
<a href="https://doc.rust-lang.org/stable/std/primitive.never.html">
denoted by an exclamation mark</a> ("<tt>!</tt>"), is the type the language uses to mark
a function that never returns and other places where a value can never occur. For
a long time, the never type was used internally by the compiler, but was
considered an unstable feature. On
<a href="https://github.com/rust-lang/rust/pull/155499">
August 24</a>, after more than two years of work,
Rust-compiler-contributor "waffle" finally managed to stabilize the type. It
took so long, in part, because it involved a small breaking
change to previous Rust editions, which the compiler maintainers needed to
ensure did not impact much real code.
</p>
Comments