Skip to content

Commit b7ec900

Browse files
committed
Remove doc of unstable feature of never type
1 parent 6af2b46 commit b7ec900

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

src/types/never.md

+13-12
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,19 @@
55
66
The never type `!` is a type with no values, representing the result of
77
computations that never complete. Expressions of type `!` can be coerced into
8-
any other type.
8+
any other type.
99

10-
<!-- ignore: unstable -->
11-
```rust,ignore
12-
let x: ! = panic!();
13-
// Can be coerced into any type.
14-
let y: u32 = x;
10+
The `!` type can **only** appear in function return types presently,
11+
indicating it is a diverging function that never returns.
12+
13+
```rust
14+
fn foo() -> ! {
15+
panic!("This call never returns.");
16+
}
1517
```
1618

17-
**NB.** The never type was expected to be stabilized in 1.41, but due
18-
to some last minute regressions detected the stabilization was
19-
temporarily reverted. The `!` type can only appear in function return
20-
types presently. See [the tracking
21-
issue](https://github.com/rust-lang/rust/issues/35121) for more
22-
details.
19+
```rust
20+
extern "C" {
21+
pub fn no_return_extern_func() -> !;
22+
}
23+
```

0 commit comments

Comments
 (0)