Skip to content

Commit c04b020

Browse files
kennytmalexcrichton
authored andcommitted
Add back missing #![feature(never_type)]s
1 parent d8cd933 commit c04b020

File tree

8 files changed

+17
-0
lines changed

8 files changed

+17
-0
lines changed

src/librustc_mir/lib.rs

+3
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ Rust MIR: a lowered representation of Rust. Also: an experiment!
4040
#![cfg_attr(stage0, feature(underscore_lifetimes))]
4141
#![cfg_attr(stage0, feature(never_type))]
4242
#![feature(inclusive_range_fields)]
43+
#![feature(crate_visibility_modifier)]
44+
#![feature(never_type)]
45+
#![cfg_attr(stage0, feature(try_trait))]
4346

4447
extern crate arena;
4548
#[macro_use]

src/librustc_typeck/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ This API is completely unstable and subject to change.
8989
#![cfg_attr(stage0, feature(i128_type))]
9090
#![cfg_attr(stage0, feature(never_type))]
9191
#![feature(dyn_trait)]
92+
#![feature(never_type)]
9293

9394
#[macro_use] extern crate log;
9495
#[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)