diff options
| author | bors <bors@rust-lang.org> | 2018-04-12 03:08:14 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-04-12 03:08:14 +0000 |
| commit | 47778811d9752d9db0d1d4621bbc225317ad216b (patch) | |
| tree | 4dbd337ce77fbadb02d50a974f51eaaaf419d124 /src/test/compile-fail | |
| parent | d26f9e42df76603fd21b0fe5dd1e8001caf9bf81 (diff) | |
| parent | 15d1c4d2139611fcb87a2c802bd015b5f4f0aed8 (diff) | |
Auto merge of #48528 - bitshifter:repr_packed, r=eddyb
Implementation of `#[repr(packed(n))]` RFC 1399. Tracking issue https://github.com/rust-lang/rust/issues/33158.
Diffstat (limited to 'src/test/compile-fail')
| -rw-r--r-- | src/test/compile-fail/conflicting-repr-hints.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/compile-fail/conflicting-repr-hints.rs b/src/test/compile-fail/conflicting-repr-hints.rs index 8acc8b7bb1e..426f60c6b09 100644 --- a/src/test/compile-fail/conflicting-repr-hints.rs +++ b/src/test/compile-fail/conflicting-repr-hints.rs @@ -9,6 +9,7 @@ // except according to those terms. #![allow(dead_code)] +#![feature(repr_packed)] #[repr(C)] enum A { A } @@ -36,6 +37,16 @@ struct G(i32); //~ ERROR type has conflicting packed and align representation hi #[repr(packed)] struct H(i32); //~ ERROR type has conflicting packed and align representation hints +#[repr(packed, packed(2))] +struct I(i32); //~ ERROR type has conflicting packed representation hints + +#[repr(packed(2))] +#[repr(packed)] +struct J(i32); //~ ERROR type has conflicting packed representation hints + +#[repr(packed, packed(1))] +struct K(i32); + #[repr(packed, align(8))] union X { //~ ERROR type has conflicting packed and align representation hints i: i32 |
