6 int_32_ref: &'static i32,
21 stringy: &'static str,
25 const I32_REF_USIZE_UNION: usize = unsafe { Nonsense { int_32_ref: &3 }.u };
26 //~^ ERROR it is undefined behavior to use this value
28 const I32_REF_U8_UNION: u8 = unsafe { Nonsense { int_32_ref: &3 }.uint_8 };
29 //~^ ERROR any use of this value will cause an error
31 const I32_REF_U16_UNION: u16 = unsafe { Nonsense { int_32_ref: &3 }.uint_16 };
32 //~^ ERROR any use of this value will cause an error
34 const I32_REF_U32_UNION: u32 = unsafe { Nonsense { int_32_ref: &3 }.uint_32 };
35 //~^ ERROR any use of this value will cause an error
37 const I32_REF_U64_UNION: u64 = unsafe { Nonsense { int_32_ref: &3 }.uint_64 };
38 //~^ ERROR it is undefined behavior to use this value
40 const I32_REF_U128_UNION: u128 = unsafe { Nonsense { int_32_ref: &3 }.uint_128 };
41 //~^ ERROR it is undefined behavior to use this value
43 const I32_REF_I8_UNION: i8 = unsafe { Nonsense { int_32_ref: &3 }.int_8 };
44 //~^ ERROR any use of this value will cause an error
46 const I32_REF_I16_UNION: i16 = unsafe { Nonsense { int_32_ref: &3 }.int_16 };
47 //~^ ERROR any use of this value will cause an error
49 const I32_REF_I32_UNION: i32 = unsafe { Nonsense { int_32_ref: &3 }.int_32 };
50 //~^ ERROR any use of this value will cause an error
52 const I32_REF_I64_UNION: i64 = unsafe { Nonsense { int_32_ref: &3 }.int_64 };
53 //~^ ERROR it is undefined behavior to use this value
55 const I32_REF_I128_UNION: i128 = unsafe { Nonsense { int_32_ref: &3 }.int_128 };
56 //~^ ERROR it is undefined behavior to use this value
58 const I32_REF_F32_UNION: f32 = unsafe { Nonsense { int_32_ref: &3 }.float_32 };
59 //~^ ERROR any use of this value will cause an error
61 const I32_REF_F64_UNION: f64 = unsafe { Nonsense { int_32_ref: &3 }.float_64 };
62 //~^ ERROR it is undefined behavior to use this value
64 const I32_REF_BOOL_UNION: bool = unsafe { Nonsense { int_32_ref: &3 }.truthy_falsey };
65 //~^ ERROR any use of this value will cause an error
67 const I32_REF_CHAR_UNION: char = unsafe { Nonsense { int_32_ref: &3 }.character };
68 //~^ ERROR any use of this value will cause an error
70 const STR_U8_UNION: u8 = unsafe { Nonsense { stringy: "3" }.uint_8 };
71 //~^ ERROR any use of this value will cause an error
73 const STR_U16_UNION: u16 = unsafe { Nonsense { stringy: "3" }.uint_16 };
74 //~^ ERROR any use of this value will cause an error
76 const STR_U32_UNION: u32 = unsafe { Nonsense { stringy: "3" }.uint_32 };
77 //~^ ERROR any use of this value will cause an error
79 const STR_U64_UNION: u64 = unsafe { Nonsense { stringy: "3" }.uint_64 };
80 //~^ ERROR it is undefined behavior to use this value
82 const STR_U128_UNION: u128 = unsafe { Nonsense { stringy: "3" }.uint_128 };
83 //~^ ERROR any use of this value will cause an error
85 const STR_I8_UNION: i8 = unsafe { Nonsense { stringy: "3" }.int_8 };
86 //~^ ERROR any use of this value will cause an error
88 const STR_I16_UNION: i16 = unsafe { Nonsense { stringy: "3" }.int_16 };
89 //~^ ERROR any use of this value will cause an error
91 const STR_I32_UNION: i32 = unsafe { Nonsense { stringy: "3" }.int_32 };
92 //~^ ERROR any use of this value will cause an error
94 const STR_I64_UNION: i64 = unsafe { Nonsense { stringy: "3" }.int_64 };
95 //~^ ERROR it is undefined behavior to use this value
97 const STR_I128_UNION: i128 = unsafe { Nonsense { stringy: "3" }.int_128 };
98 //~^ ERROR any use of this value will cause an error
100 const STR_F32_UNION: f32 = unsafe { Nonsense { stringy: "3" }.float_32 };
101 //~^ ERROR any use of this value will cause an error
103 const STR_F64_UNION: f64 = unsafe { Nonsense { stringy: "3" }.float_64 };
104 //~^ ERROR it is undefined behavior to use this value
106 const STR_BOOL_UNION: bool = unsafe { Nonsense { stringy: "3" }.truthy_falsey };
107 //~^ ERROR any use of this value will cause an error
109 const STR_CHAR_UNION: char = unsafe { Nonsense { stringy: "3" }.character };
110 //~^ ERROR any use of this value will cause an error