diff options
| author | Taylor Cramer <cramertj@google.com> | 2018-12-21 10:18:38 -0800 |
|---|---|---|
| committer | Taylor Cramer <cramertj@google.com> | 2018-12-21 10:18:38 -0800 |
| commit | 87c8cdd8efb60a9a4b57e5b959bc56d36ea511b5 (patch) | |
| tree | 2d7d0becde6d23eb07d0e0a7c87f18267d8ffbcd /src/test | |
| parent | 01c6ea2f37326674bf6ca64de55bf5fd90e45015 (diff) | |
| download | rust-87c8cdd8efb60a9a4b57e5b959bc56d36ea511b5.tar.gz rust-87c8cdd8efb60a9a4b57e5b959bc56d36ea511b5.zip | |
Stabilize #[repr(packed(N))]
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/codegen/packed.rs | 1 | ||||
| -rw-r--r-- | src/test/run-pass/issues/issue-48159.rs | 1 | ||||
| -rw-r--r-- | src/test/run-pass/packed/auxiliary/packed.rs | 2 | ||||
| -rw-r--r-- | src/test/run-pass/packed/packed-struct-borrow-element.rs | 2 | ||||
| -rw-r--r-- | src/test/run-pass/packed/packed-struct-generic-size.rs | 3 | ||||
| -rw-r--r-- | src/test/run-pass/packed/packed-struct-generic-size.stderr | 12 | ||||
| -rw-r--r-- | src/test/run-pass/packed/packed-struct-match.rs | 1 | ||||
| -rw-r--r-- | src/test/run-pass/packed/packed-struct-size.rs | 3 | ||||
| -rw-r--r-- | src/test/run-pass/packed/packed-struct-vec.rs | 1 | ||||
| -rw-r--r-- | src/test/run-pass/packed/packed-tuple-struct-size.rs | 2 | ||||
| -rw-r--r-- | src/test/run-pass/structs-enums/align-struct.rs | 1 | ||||
| -rw-r--r-- | src/test/run-pass/union/union-packed.rs | 1 | ||||
| -rw-r--r-- | src/test/ui/conflicting-repr-hints.rs | 1 | ||||
| -rw-r--r-- | src/test/ui/conflicting-repr-hints.stderr | 20 | ||||
| -rw-r--r-- | src/test/ui/feature-gates/feature-gate-repr_packed.rs | 18 | ||||
| -rw-r--r-- | src/test/ui/feature-gates/feature-gate-repr_packed.stderr | 19 | ||||
| -rw-r--r-- | src/test/ui/print_type_sizes/packed.rs | 1 |
17 files changed, 16 insertions, 73 deletions
diff --git a/src/test/codegen/packed.rs b/src/test/codegen/packed.rs index b50f5b6f16f..fb6507fd22a 100644 --- a/src/test/codegen/packed.rs +++ b/src/test/codegen/packed.rs @@ -13,7 +13,6 @@ // min-llvm-version 7.0 #![crate_type = "lib"] -#![feature(repr_packed)] #[repr(packed)] pub struct Packed1 { diff --git a/src/test/run-pass/issues/issue-48159.rs b/src/test/run-pass/issues/issue-48159.rs index 2f625747b25..0d5b211bca9 100644 --- a/src/test/run-pass/issues/issue-48159.rs +++ b/src/test/run-pass/issues/issue-48159.rs @@ -9,7 +9,6 @@ // except according to those terms. // run-pass -#![feature(repr_packed)] #![allow(non_camel_case_types)] use std::mem; diff --git a/src/test/run-pass/packed/auxiliary/packed.rs b/src/test/run-pass/packed/auxiliary/packed.rs index 828be41cd41..6884c360e4a 100644 --- a/src/test/run-pass/packed/auxiliary/packed.rs +++ b/src/test/run-pass/packed/auxiliary/packed.rs @@ -8,8 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(repr_packed)] - #[repr(packed)] pub struct P1S5 { a: u8, diff --git a/src/test/run-pass/packed/packed-struct-borrow-element.rs b/src/test/run-pass/packed/packed-struct-borrow-element.rs index 69969ba640f..87c26c597f5 100644 --- a/src/test/run-pass/packed/packed-struct-borrow-element.rs +++ b/src/test/run-pass/packed/packed-struct-borrow-element.rs @@ -12,8 +12,6 @@ #![allow(dead_code)] // ignore-emscripten weird assertion? -#![feature(repr_packed)] - #[repr(packed)] struct Foo1 { bar: u8, diff --git a/src/test/run-pass/packed/packed-struct-generic-size.rs b/src/test/run-pass/packed/packed-struct-generic-size.rs index 58cd5505ffc..9608ff4ec0e 100644 --- a/src/test/run-pass/packed/packed-struct-generic-size.rs +++ b/src/test/run-pass/packed/packed-struct-generic-size.rs @@ -10,11 +10,8 @@ // run-pass #![allow(dead_code)] -#![allow(stable_features)] #![allow(unused_comparisons)] -#![feature(repr_packed)] - use std::mem; #[repr(packed)] diff --git a/src/test/run-pass/packed/packed-struct-generic-size.stderr b/src/test/run-pass/packed/packed-struct-generic-size.stderr index 994ea7c44fb..672952f6e9f 100644 --- a/src/test/run-pass/packed/packed-struct-generic-size.stderr +++ b/src/test/run-pass/packed/packed-struct-generic-size.stderr @@ -1,35 +1,35 @@ warning: unnecessary path disambiguator - --> $DIR/packed-struct-generic-size.rs:49:14 + --> $DIR/packed-struct-generic-size.rs:46:14 | LL | check!(P1::<u8, u8>, 1, 3); | ^^ try removing `::` warning: unnecessary path disambiguator - --> $DIR/packed-struct-generic-size.rs:50:14 + --> $DIR/packed-struct-generic-size.rs:47:14 | LL | check!(P1::<u64, u16>, 1, 11); | ^^ try removing `::` warning: unnecessary path disambiguator - --> $DIR/packed-struct-generic-size.rs:52:14 + --> $DIR/packed-struct-generic-size.rs:49:14 | LL | check!(P2::<u8, u8>, 1, 3); | ^^ try removing `::` warning: unnecessary path disambiguator - --> $DIR/packed-struct-generic-size.rs:53:14 + --> $DIR/packed-struct-generic-size.rs:50:14 | LL | check!(P2::<u64, u16>, 2, 12); | ^^ try removing `::` warning: unnecessary path disambiguator - --> $DIR/packed-struct-generic-size.rs:55:15 + --> $DIR/packed-struct-generic-size.rs:52:15 | LL | check!(P4C::<u8, u8>, 1, 3); | ^^ try removing `::` warning: unnecessary path disambiguator - --> $DIR/packed-struct-generic-size.rs:56:15 + --> $DIR/packed-struct-generic-size.rs:53:15 | LL | check!(P4C::<u16, u64>, 4, 12); | ^^ try removing `::` diff --git a/src/test/run-pass/packed/packed-struct-match.rs b/src/test/run-pass/packed/packed-struct-match.rs index e349a4e7f54..21ef55e5a42 100644 --- a/src/test/run-pass/packed/packed-struct-match.rs +++ b/src/test/run-pass/packed/packed-struct-match.rs @@ -9,7 +9,6 @@ // except according to those terms. // run-pass -#![feature(repr_packed)] #[repr(packed)] struct Foo1 { diff --git a/src/test/run-pass/packed/packed-struct-size.rs b/src/test/run-pass/packed/packed-struct-size.rs index 27e07b87ff4..d6a236ffc6d 100644 --- a/src/test/run-pass/packed/packed-struct-size.rs +++ b/src/test/run-pass/packed/packed-struct-size.rs @@ -13,9 +13,6 @@ #![allow(non_camel_case_types)] #![allow(non_upper_case_globals)] -#![feature(repr_packed)] - - use std::mem; #[repr(packed)] diff --git a/src/test/run-pass/packed/packed-struct-vec.rs b/src/test/run-pass/packed/packed-struct-vec.rs index d64bfe0033b..6fd24479c19 100644 --- a/src/test/run-pass/packed/packed-struct-vec.rs +++ b/src/test/run-pass/packed/packed-struct-vec.rs @@ -9,7 +9,6 @@ // except according to those terms. // run-pass -#![feature(repr_packed)] use std::fmt; use std::mem; diff --git a/src/test/run-pass/packed/packed-tuple-struct-size.rs b/src/test/run-pass/packed/packed-tuple-struct-size.rs index 011ff4c20f4..8b18bd33c74 100644 --- a/src/test/run-pass/packed/packed-tuple-struct-size.rs +++ b/src/test/run-pass/packed/packed-tuple-struct-size.rs @@ -12,8 +12,6 @@ #![allow(dead_code)] #![allow(non_camel_case_types)] -#![feature(repr_packed)] - use std::mem; #[repr(packed)] diff --git a/src/test/run-pass/structs-enums/align-struct.rs b/src/test/run-pass/structs-enums/align-struct.rs index a0d05a6d0d2..109d5b75590 100644 --- a/src/test/run-pass/structs-enums/align-struct.rs +++ b/src/test/run-pass/structs-enums/align-struct.rs @@ -11,7 +11,6 @@ // run-pass #![allow(dead_code)] #![feature(box_syntax)] -#![feature(repr_packed)] use std::mem; diff --git a/src/test/run-pass/union/union-packed.rs b/src/test/run-pass/union/union-packed.rs index a6aef9046ee..4c9e06a395c 100644 --- a/src/test/run-pass/union/union-packed.rs +++ b/src/test/run-pass/union/union-packed.rs @@ -13,7 +13,6 @@ #![allow(non_snake_case)] #![feature(untagged_unions)] -#![feature(repr_packed)] use std::mem::{size_of, size_of_val, align_of, align_of_val}; diff --git a/src/test/ui/conflicting-repr-hints.rs b/src/test/ui/conflicting-repr-hints.rs index 426f60c6b09..f16bd1003f9 100644 --- a/src/test/ui/conflicting-repr-hints.rs +++ b/src/test/ui/conflicting-repr-hints.rs @@ -9,7 +9,6 @@ // except according to those terms. #![allow(dead_code)] -#![feature(repr_packed)] #[repr(C)] enum A { A } diff --git a/src/test/ui/conflicting-repr-hints.stderr b/src/test/ui/conflicting-repr-hints.stderr index 7a4e5a5488a..01b72d93823 100644 --- a/src/test/ui/conflicting-repr-hints.stderr +++ b/src/test/ui/conflicting-repr-hints.stderr @@ -1,47 +1,47 @@ warning[E0566]: conflicting representation hints - --> $DIR/conflicting-repr-hints.rs:20:8 + --> $DIR/conflicting-repr-hints.rs:19:8 | LL | #[repr(C, u64)] //~ WARNING conflicting representation hints | ^ ^^^ warning[E0566]: conflicting representation hints - --> $DIR/conflicting-repr-hints.rs:23:8 + --> $DIR/conflicting-repr-hints.rs:22:8 | LL | #[repr(u32, u64)] //~ WARNING conflicting representation hints | ^^^ ^^^ error[E0587]: type has conflicting packed and align representation hints - --> $DIR/conflicting-repr-hints.rs:30:1 + --> $DIR/conflicting-repr-hints.rs:29:1 | LL | struct F(i32); //~ ERROR type has conflicting packed and align representation hints | ^^^^^^^^^^^^^^ error[E0587]: type has conflicting packed and align representation hints - --> $DIR/conflicting-repr-hints.rs:34:1 + --> $DIR/conflicting-repr-hints.rs:33:1 | LL | struct G(i32); //~ ERROR type has conflicting packed and align representation hints | ^^^^^^^^^^^^^^ error[E0587]: type has conflicting packed and align representation hints - --> $DIR/conflicting-repr-hints.rs:38:1 + --> $DIR/conflicting-repr-hints.rs:37:1 | LL | struct H(i32); //~ ERROR type has conflicting packed and align representation hints | ^^^^^^^^^^^^^^ error[E0634]: type has conflicting packed representation hints - --> $DIR/conflicting-repr-hints.rs:41:1 + --> $DIR/conflicting-repr-hints.rs:40:1 | LL | struct I(i32); //~ ERROR type has conflicting packed representation hints | ^^^^^^^^^^^^^^ error[E0634]: type has conflicting packed representation hints - --> $DIR/conflicting-repr-hints.rs:45:1 + --> $DIR/conflicting-repr-hints.rs:44:1 | LL | struct J(i32); //~ ERROR type has conflicting packed representation hints | ^^^^^^^^^^^^^^ error[E0587]: type has conflicting packed and align representation hints - --> $DIR/conflicting-repr-hints.rs:51:1 + --> $DIR/conflicting-repr-hints.rs:50:1 | LL | / union X { //~ ERROR type has conflicting packed and align representation hints LL | | i: i32 @@ -49,7 +49,7 @@ LL | | } | |_^ error[E0587]: type has conflicting packed and align representation hints - --> $DIR/conflicting-repr-hints.rs:57:1 + --> $DIR/conflicting-repr-hints.rs:56:1 | LL | / union Y { //~ ERROR type has conflicting packed and align representation hints LL | | i: i32 @@ -57,7 +57,7 @@ LL | | } | |_^ error[E0587]: type has conflicting packed and align representation hints - --> $DIR/conflicting-repr-hints.rs:63:1 + --> $DIR/conflicting-repr-hints.rs:62:1 | LL | / union Z { //~ ERROR type has conflicting packed and align representation hints LL | | i: i32 diff --git a/src/test/ui/feature-gates/feature-gate-repr_packed.rs b/src/test/ui/feature-gates/feature-gate-repr_packed.rs deleted file mode 100644 index 65e3be288fd..00000000000 --- a/src/test/ui/feature-gates/feature-gate-repr_packed.rs +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright 2018 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(packed(1))] //~ error: the `#[repr(packed(n))]` attribute is experimental -struct Foo(u64); - -#[repr(C)] -#[repr(packed(1))] //~ error: the `#[repr(packed(n))]` attribute is experimental -struct Bar(u64); - -fn main() {} diff --git a/src/test/ui/feature-gates/feature-gate-repr_packed.stderr b/src/test/ui/feature-gates/feature-gate-repr_packed.stderr deleted file mode 100644 index ed89a3f6b31..00000000000 --- a/src/test/ui/feature-gates/feature-gate-repr_packed.stderr +++ /dev/null @@ -1,19 +0,0 @@ -error[E0658]: the `#[repr(packed(n))]` attribute is experimental (see issue #33158) - --> $DIR/feature-gate-repr_packed.rs:11:1 - | -LL | #[repr(packed(1))] //~ error: the `#[repr(packed(n))]` attribute is experimental - | ^^^^^^^^^^^^^^^^^^ - | - = help: add #![feature(repr_packed)] to the crate attributes to enable - -error[E0658]: the `#[repr(packed(n))]` attribute is experimental (see issue #33158) - --> $DIR/feature-gate-repr_packed.rs:15:1 - | -LL | #[repr(packed(1))] //~ error: the `#[repr(packed(n))]` attribute is experimental - | ^^^^^^^^^^^^^^^^^^ - | - = help: add #![feature(repr_packed)] to the crate attributes to enable - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0658`. diff --git a/src/test/ui/print_type_sizes/packed.rs b/src/test/ui/print_type_sizes/packed.rs index bc11146aa85..9ff794178fc 100644 --- a/src/test/ui/print_type_sizes/packed.rs +++ b/src/test/ui/print_type_sizes/packed.rs @@ -21,7 +21,6 @@ #![allow(dead_code)] #![feature(start)] -#![feature(repr_packed)] #[derive(Default)] #[repr(packed)] |
