blob: 8097414be687f5a0076333287e320500b42d1536 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
//! Test that we produce the same niche range no
//! matter of signendess if the discriminants are the same.
#![feature(rustc_attrs)]
#[repr(u16)]
#[rustc_layout(debug)]
enum UnsignedAroundZero {
//~^ ERROR: layout_of
A = 65535,
B = 0,
C = 1,
}
#[repr(i16)]
#[rustc_layout(debug)]
enum SignedAroundZero {
//~^ ERROR: layout_of
A = -1,
B = 0,
C = 1,
}
fn main() {}
|