Stabilized #[repr(align(x))] attribute (RFC 1358)
This commit is contained in:
parent
fdc18b3067
commit
651ea8ea44
14 changed files with 20 additions and 65 deletions
|
|
@ -1,15 +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.
|
||||
#![feature(attr_literals)]
|
||||
|
||||
#[repr(align(64))] //~ error: the struct `#[repr(align(u16))]` attribute is experimental
|
||||
struct Foo(u64, u64);
|
||||
|
||||
fn main() {}
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
error[E0658]: the struct `#[repr(align(u16))]` attribute is experimental (see issue #33626)
|
||||
--> $DIR/feature-gate-repr_align.rs:12:1
|
||||
|
|
||||
12 | #[repr(align(64))] //~ error: the struct `#[repr(align(u16))]` attribute is experimental
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: add #![feature(repr_align)] to the crate attributes to enable
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
@ -18,8 +18,6 @@
|
|||
// It avoids using u64/i64 because on some targets that is only 4-byte
|
||||
// aligned (while on most it is 8-byte aligned) and so the resulting
|
||||
// padding and overall computed sizes can be quite different.
|
||||
#![feature(attr_literals)]
|
||||
#![feature(repr_align)]
|
||||
#![feature(start)]
|
||||
#![allow(dead_code)]
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
#![feature(attr_literals)]
|
||||
|
||||
#[repr(align(16))] //~ ERROR is experimental
|
||||
#[repr(align(16))]
|
||||
struct Gem {
|
||||
mohs_hardness: u8,
|
||||
poofed: bool,
|
||||
|
|
|
|||
|
|
@ -1,11 +1,3 @@
|
|||
error[E0658]: the struct `#[repr(align(u16))]` attribute is experimental (see issue #33626)
|
||||
--> $DIR/gated-features-attr-spans.rs:13:1
|
||||
|
|
||||
13 | #[repr(align(16))] //~ ERROR is experimental
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: add #![feature(repr_align)] to the crate attributes to enable
|
||||
|
||||
error[E0658]: SIMD types are experimental and possibly buggy (see issue #27731)
|
||||
--> $DIR/gated-features-attr-spans.rs:20:1
|
||||
|
|
||||
|
|
@ -30,5 +22,5 @@ warning: `#[must_use]` on functions is experimental (see issue #43302)
|
|||
|
|
||||
= help: add #![feature(fn_must_use)] to the crate attributes to enable
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue