From 74ef63ff0aeeffc87b8d53f5fe3aadbe7cc00d3e Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sun, 15 Dec 2019 12:22:09 +0100 Subject: [PATCH] the never type got de-stabilized again; adjust tests --- rust-version | 2 +- tests/compile-fail/never_say_never.rs | 1 + tests/compile-fail/never_transmute_humans.rs | 2 ++ tests/compile-fail/never_transmute_void.rs | 1 + tests/run-pass/async-fn.rs | 2 ++ tests/run-pass/generator.rs | 2 +- tests/run-pass/loop-break-value.rs | 1 + tests/run-pass/panic/catch_panic.rs | 2 +- 8 files changed, 10 insertions(+), 3 deletions(-) diff --git a/rust-version b/rust-version index afa5b6ae486..584f9f86b98 100644 --- a/rust-version +++ b/rust-version @@ -1 +1 @@ -12307b3b08edee543a78fb9d4a837fbd6d6ac0fa +a605441e049f0b6d5f7715b94b8ac4662fd7fcf6 diff --git a/tests/compile-fail/never_say_never.rs b/tests/compile-fail/never_say_never.rs index 21fc16751c2..37dfe827d99 100644 --- a/tests/compile-fail/never_say_never.rs +++ b/tests/compile-fail/never_say_never.rs @@ -1,6 +1,7 @@ // This should fail even without validation // compile-flags: -Zmiri-disable-validation +#![feature(never_type)] #![allow(unreachable_code)] fn main() { diff --git a/tests/compile-fail/never_transmute_humans.rs b/tests/compile-fail/never_transmute_humans.rs index 5053be24ebf..2e0d4e9bdf3 100644 --- a/tests/compile-fail/never_transmute_humans.rs +++ b/tests/compile-fail/never_transmute_humans.rs @@ -1,6 +1,8 @@ // This should fail even without validation // compile-flags: -Zmiri-disable-validation +#![feature(never_type)] + struct Human; fn main() { diff --git a/tests/compile-fail/never_transmute_void.rs b/tests/compile-fail/never_transmute_void.rs index a9cbac528d7..2a822ab1b51 100644 --- a/tests/compile-fail/never_transmute_void.rs +++ b/tests/compile-fail/never_transmute_void.rs @@ -1,6 +1,7 @@ // This should fail even without validation // compile-flags: -Zmiri-disable-validation +#![feature(never_type)] #![allow(unused, invalid_value)] enum Void {} diff --git a/tests/run-pass/async-fn.rs b/tests/run-pass/async-fn.rs index a4c176ad8f1..90448aca177 100644 --- a/tests/run-pass/async-fn.rs +++ b/tests/run-pass/async-fn.rs @@ -1,3 +1,5 @@ +#![feature(never_type)] + use std::{future::Future, pin::Pin, task::Poll, ptr}; use std::task::{Waker, RawWaker, RawWakerVTable, Context}; diff --git a/tests/run-pass/generator.rs b/tests/run-pass/generator.rs index 00ebba6344e..c31b5b9ed3b 100644 --- a/tests/run-pass/generator.rs +++ b/tests/run-pass/generator.rs @@ -1,4 +1,4 @@ -#![feature(generators, generator_trait)] +#![feature(generators, generator_trait, never_type)] use std::ops::{GeneratorState, Generator}; use std::pin::Pin; diff --git a/tests/run-pass/loop-break-value.rs b/tests/run-pass/loop-break-value.rs index 43acdc22820..bd7afa7ec1a 100644 --- a/tests/run-pass/loop-break-value.rs +++ b/tests/run-pass/loop-break-value.rs @@ -1,3 +1,4 @@ +#![feature(never_type)] #![allow(unreachable_code)] #[allow(unused)] diff --git a/tests/run-pass/panic/catch_panic.rs b/tests/run-pass/panic/catch_panic.rs index a14dd411c1c..722da68b70b 100644 --- a/tests/run-pass/panic/catch_panic.rs +++ b/tests/run-pass/panic/catch_panic.rs @@ -1,6 +1,6 @@ // ignore-windows: Unwind panicking does not currently work on Windows +#![feature(never_type)] #![allow(const_err)] - use std::panic::{catch_unwind, AssertUnwindSafe}; use std::cell::Cell;