Skip to content

Commit 42b6d46

Browse files
committed
Add back missing #![feature(never_type)]s
1 parent d141fdc commit 42b6d46

File tree

8 files changed

+15
-0
lines changed

8 files changed

+15
-0
lines changed

src/librustc_mir/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ Rust MIR: a lowered representation of Rust. Also: an experiment!
3333
#![feature(nonzero)]
3434
#![feature(inclusive_range_fields)]
3535
#![feature(crate_visibility_modifier)]
36+
#![feature(never_type)]
3637
#![cfg_attr(stage0, feature(try_trait))]
3738

3839
extern crate arena;

src/librustc_typeck/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ This API is completely unstable and subject to change.
8282
#![feature(slice_patterns)]
8383
#![feature(slice_sort_by_cached_key)]
8484
#![feature(dyn_trait)]
85+
#![feature(never_type)]
8586

8687
#[macro_use] extern crate log;
8788
#[macro_use] extern crate syntax;

src/libstd/primitive_docs.rs

+2
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ mod prim_bool { }
7979
/// write:
8080
///
8181
/// ```
82+
/// #![feature(never_type)]
8283
/// # fn foo() -> u32 {
8384
/// let x: ! = {
8485
/// return 123
@@ -155,6 +156,7 @@ mod prim_bool { }
155156
/// for example:
156157
///
157158
/// ```
159+
/// #![feature(never_type)]
158160
/// # use std::fmt;
159161
/// # trait Debug {
160162
/// # fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result;

src/test/run-fail/adjust_never.rs

+3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
// Test that a variable of type ! can coerce to another type.
1212

1313
// error-pattern:explicit
14+
15+
#![feature(never_type)]
16+
1417
fn main() {
1518
let x: ! = panic!();
1619
let y: u32 = x;

src/test/run-fail/call-fn-never-arg.rs

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
// error-pattern:wowzers!
1414

15+
#![feature(never_type)]
1516
#![allow(unreachable_code)]
1617

1718
fn foo(x: !) -> ! {

src/test/run-fail/cast-never.rs

+3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
// Test that we can explicitly cast ! to another type
1212

1313
// error-pattern:explicit
14+
15+
#![feature(never_type)]
16+
1417
fn main() {
1518
let x: ! = panic!();
1619
let y: u32 = x as u32;

src/test/run-fail/never-associated-type.rs

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212

1313
// error-pattern:kapow!
1414

15+
#![feature(never_type)]
16+
1517
trait Foo {
1618
type Wow;
1719

src/test/run-fail/never-type-arg.rs

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212

1313
// error-pattern:oh no!
1414

15+
#![feature(never_type)]
16+
1517
struct Wub;
1618

1719
impl PartialEq<!> for Wub {

0 commit comments

Comments
 (0)