Add back missing #![feature(never_type)]s

This commit is contained in:
kennytm 2018-04-21 02:48:56 +08:00
parent d141fdc3bf
commit 42b6d4653a
No known key found for this signature in database
GPG key ID: FEF6C8051D0E013C
8 changed files with 15 additions and 0 deletions

View file

@ -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;

View file

@ -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;

View file

@ -79,6 +79,7 @@ mod prim_bool { }
/// write:
///
/// ```
/// #![feature(never_type)]
/// # fn foo() -> u32 {
/// let x: ! = {
/// return 123
@ -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;

View file

@ -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;

View file

@ -12,6 +12,7 @@
// error-pattern:wowzers!
#![feature(never_type)]
#![allow(unreachable_code)]
fn foo(x: !) -> ! {

View file

@ -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;

View file

@ -12,6 +12,8 @@
// error-pattern:kapow!
#![feature(never_type)]
trait Foo {
type Wow;

View file

@ -12,6 +12,8 @@
// error-pattern:oh no!
#![feature(never_type)]
struct Wub;
impl PartialEq<!> for Wub {