Skip to content

Commit d8dfe1b

Browse files
authored
Merge pull request #730 from nikomatsakis/never-type-feature-gate
introduce feature gate into never-type test
2 parents 2943dd2 + 7c309f3 commit d8dfe1b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/types/never.md

+8
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,15 @@ computations that never complete. Expressions of type `!` can be coerced into
88
any other type.
99

1010
```rust,should_panic
11+
#![feature(never_type)]
1112
let x: ! = panic!();
1213
// Can be coerced into any type.
1314
let y: u32 = x;
1415
```
16+
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.

0 commit comments

Comments
 (0)