]>
Commit | Line | Data |
---|---|---|
1a4d82fc JJ |
1 | // Copyright 2014 The Rust Project Developers. See the COPYRIGHT |
2 | // file at the top-level directory of this distribution and at | |
3 | // http://rust-lang.org/COPYRIGHT. | |
4 | // | |
5 | // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or | |
6 | // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license | |
7 | // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your | |
8 | // option. This file may not be copied, modified, or distributed | |
9 | // except according to those terms. | |
10 | // | |
9e0c209e | 11 | #![warn(variant_size_differences)] |
1a4d82fc JJ |
12 | #![allow(dead_code)] |
13 | ||
14 | enum Enum1 { } | |
15 | ||
16 | enum Enum2 { A, B, C } | |
17 | ||
c34b1796 | 18 | enum Enum3 { D(isize), E, F } |
1a4d82fc | 19 | |
c34b1796 | 20 | enum Enum4 { H(isize), I(isize), J } |
1a4d82fc | 21 | |
9e0c209e SL |
22 | enum Enum5 { |
23 | L(isize, isize, isize, isize), //~ WARNING three times larger | |
c34b1796 | 24 | M(isize), |
1a4d82fc JJ |
25 | N |
26 | } | |
27 | ||
28 | enum Enum6<T, U> { | |
29 | O(T), | |
30 | P(U), | |
c34b1796 | 31 | Q(isize) |
1a4d82fc JJ |
32 | } |
33 | ||
9e0c209e | 34 | #[allow(variant_size_differences)] |
1a4d82fc | 35 | enum Enum7 { |
c34b1796 AL |
36 | R(isize, isize, isize, isize), |
37 | S(isize), | |
1a4d82fc JJ |
38 | T |
39 | } | |
40 | pub fn main() { } |