stabilize transparent_enums

This commit is contained in:
Mazdak Farrokhzad 2020-01-11 00:53:54 +01:00
parent 900811e430
commit 93efe41b4e
12 changed files with 8 additions and 130 deletions

View file

@ -10,7 +10,7 @@
// ignore-windows
// See repr-transparent.rs
#![feature(transparent_enums, transparent_unions)]
#![feature(transparent_unions)]
#![crate_type="lib"]

View file

@ -13,7 +13,7 @@
// ignore-x86_64
// See repr-transparent.rs
#![feature(transparent_enums, transparent_unions)]
#![feature(transparent_unions)]
#![crate_type="lib"]

View file

@ -3,7 +3,7 @@
// only-mips64
// See repr-transparent.rs
#![feature(transparent_enums, transparent_unions)]
#![feature(transparent_unions)]
#![crate_type="lib"]

View file

@ -1,7 +1,7 @@
// compile-flags: -C no-prepopulate-passes
#![crate_type="lib"]
#![feature(repr_simd, transparent_enums, transparent_unions)]
#![feature(repr_simd, transparent_unions)]
use std::marker::PhantomData;

View file

@ -1,6 +0,0 @@
#[repr(transparent)]
enum OkButUnstableEnum { //~ ERROR transparent enums are unstable
Foo((), String, ()),
}
fn main() {}

View file

@ -1,12 +0,0 @@
error[E0658]: transparent enums are unstable
--> $DIR/feature-gate-transparent_enums.rs:2:1
|
LL | enum OkButUnstableEnum {
| ^^^^^^^^^^^^^^^^^^^^^^
|
= note: for more information, see https://github.com/rust-lang/rust/issues/60405
= help: add `#![feature(transparent_enums)]` to the crate attributes to enable
error: aborting due to previous error
For more information about this error, try `rustc --explain E0658`.

View file

@ -1,4 +1,4 @@
#![feature(transparent_enums, transparent_unions)]
#![feature(transparent_unions)]
#![feature(ptr_internals)]
#![deny(improper_ctypes)]
#![allow(dead_code)]

View file

@ -3,7 +3,7 @@
// - repr-transparent-other-reprs.rs
// - repr-transparent-other-items.rs
#![feature(repr_align, transparent_enums, transparent_unions)]
#![feature(transparent_unions)]
use std::marker::PhantomData;