Skip to content

Commit

Permalink
Add back missing #![feature(never_type)]s
Browse files Browse the repository at this point in the history
  • Loading branch information
kennytm committed Apr 21, 2018
1 parent d141fdc commit 42b6d46
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/librustc_mir/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Rust MIR: a lowered representation of Rust. Also: an experiment!
#![feature(nonzero)]
#![feature(inclusive_range_fields)]
#![feature(crate_visibility_modifier)]
#![feature(never_type)]
#![cfg_attr(stage0, feature(try_trait))]

extern crate arena;
Expand Down
1 change: 1 addition & 0 deletions src/librustc_typeck/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ This API is completely unstable and subject to change.
#![feature(slice_patterns)]
#![feature(slice_sort_by_cached_key)]
#![feature(dyn_trait)]
#![feature(never_type)]

#[macro_use] extern crate log;
#[macro_use] extern crate syntax;
Expand Down
2 changes: 2 additions & 0 deletions src/libstd/primitive_docs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ mod prim_bool { }
/// write:
///
/// ```
/// #![feature(never_type)]
/// # fn foo() -> u32 {
/// let x: ! = {
/// return 123
Expand Down Expand Up @@ -155,6 +156,7 @@ mod prim_bool { }
/// for example:
///
/// ```
/// #![feature(never_type)]
/// # use std::fmt;
/// # trait Debug {
/// # fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result;
Expand Down
3 changes: 3 additions & 0 deletions src/test/run-fail/adjust_never.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
// Test that a variable of type ! can coerce to another type.

// error-pattern:explicit

#![feature(never_type)]

fn main() {
let x: ! = panic!();
let y: u32 = x;
Expand Down
1 change: 1 addition & 0 deletions src/test/run-fail/call-fn-never-arg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

// error-pattern:wowzers!

#![feature(never_type)]
#![allow(unreachable_code)]

fn foo(x: !) -> ! {
Expand Down
3 changes: 3 additions & 0 deletions src/test/run-fail/cast-never.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
// Test that we can explicitly cast ! to another type

// error-pattern:explicit

#![feature(never_type)]

fn main() {
let x: ! = panic!();
let y: u32 = x as u32;
Expand Down
2 changes: 2 additions & 0 deletions src/test/run-fail/never-associated-type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

// error-pattern:kapow!

#![feature(never_type)]

trait Foo {
type Wow;

Expand Down
2 changes: 2 additions & 0 deletions src/test/run-fail/never-type-arg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

// error-pattern:oh no!

#![feature(never_type)]

struct Wub;

impl PartialEq<!> for Wub {
Expand Down

0 comments on commit 42b6d46

Please sign in to comment.