Auto merge of #51562 - SimonSapin:transparent, r=cramertj

Stabilize #[repr(transparent)]

Tracking issue FCP: https://github.com/rust-lang/rust/issues/43036#issuecomment-394094318
Reference PR: https://github.com/rust-lang-nursery/reference/pull/353
This commit is contained in:
bors 2018-06-16 10:59:40 +00:00
commit 61ba018093
17 changed files with 9 additions and 237 deletions

View file

@ -18,7 +18,6 @@
// See repr-transparent.rs
#![crate_type="lib"]
#![feature(repr_transparent)]
#[repr(C)]

View file

@ -22,7 +22,6 @@
// See repr-transparent.rs
#![crate_type="lib"]
#![feature(repr_transparent)]
#[repr(C)]

View file

@ -14,7 +14,6 @@
// See repr-transparent.rs
#![crate_type="lib"]
#![feature(repr_transparent)]
#[repr(C)]

View file

@ -13,7 +13,6 @@
// compile-flags: -C no-prepopulate-passes
#![crate_type="lib"]
#![feature(repr_transparent)]
#[repr(C)]
pub struct Rgb8 { r: u8, g: u8, b: u8 }

View file

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

View file

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(repr_transparent)]
// See also repr-transparent.rs
#[repr(transparent)] //~ ERROR unsupported representation for zero-variant enum

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(repr_transparent, repr_align, attr_literals)]
#![feature(repr_align, attr_literals)]
// See also repr-transparent.rs

View file

@ -14,7 +14,6 @@
// - repr-transparent-other-items.rs
#![feature(repr_align, attr_literals)]
#![feature(repr_transparent)]
use std::marker::PhantomData;

View file

@ -1,14 +0,0 @@
// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[repr(transparent)] //~ error: the `#[repr(transparent)]` attribute is experimental
struct Foo(u64);
fn main() {}

View file

@ -1,11 +0,0 @@
error[E0658]: the `#[repr(transparent)]` attribute is experimental (see issue #43036)
--> $DIR/feature-gate-repr_transparent.rs:11:1
|
LL | #[repr(transparent)] //~ error: the `#[repr(transparent)]` attribute is experimental
| ^^^^^^^^^^^^^^^^^^^^
|
= help: add #![feature(repr_transparent)] to the crate attributes to enable
error: aborting due to previous error
For more information about this error, try `rustc --explain E0658`.

View file

@ -9,7 +9,7 @@
// except according to those terms.
#![deny(improper_ctypes)]
#![feature(libc, repr_transparent)]
#![feature(libc)]
extern crate libc;