Add back missing #![feature(never_type)]s
This commit is contained in:
parent
d141fdc3bf
commit
42b6d4653a
8 changed files with 15 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@
|
|||
|
||||
// error-pattern:wowzers!
|
||||
|
||||
#![feature(never_type)]
|
||||
#![allow(unreachable_code)]
|
||||
|
||||
fn foo(x: !) -> ! {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -12,6 +12,8 @@
|
|||
|
||||
// error-pattern:kapow!
|
||||
|
||||
#![feature(never_type)]
|
||||
|
||||
trait Foo {
|
||||
type Wow;
|
||||
|
||||
|
|
|
|||
|
|
@ -12,6 +12,8 @@
|
|||
|
||||
// error-pattern:oh no!
|
||||
|
||||
#![feature(never_type)]
|
||||
|
||||
struct Wub;
|
||||
|
||||
impl PartialEq<!> for Wub {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue