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
30 //~| WARN this was previously accepted by the compiler but is being phased out
32 const I32_REF_U16_UNION: u16 = unsafe { Nonsense { int_32_ref: &3 }.uint_16 };
33 //~^ ERROR any use of this value will cause an error
34 //~| WARN this was previously accepted by the compiler but is being phased out
36 const I32_REF_U32_UNION: u32 = unsafe { Nonsense { int_32_ref: &3 }.uint_32 };
37 //~^ ERROR any use of this value will cause an error
38 //~| WARN this was previously accepted by the compiler but is being phased out
40 const I32_REF_U64_UNION: u64 = unsafe { Nonsense { int_32_ref: &3 }.uint_64 };
41 //~^ ERROR it is undefined behavior to use this value
43 const I32_REF_U128_UNION: u128 = unsafe { Nonsense { int_32_ref: &3 }.uint_128 };
44 //~^ ERROR it is undefined behavior to use this value
46 const I32_REF_I8_UNION: i8 = unsafe { Nonsense { int_32_ref: &3 }.int_8 };
47 //~^ ERROR any use of this value will cause an error
48 //~| WARN this was previously accepted by the compiler but is being phased out
50 const I32_REF_I16_UNION: i16 = unsafe { Nonsense { int_32_ref: &3 }.int_16 };
51 //~^ ERROR any use of this value will cause an error
52 //~| WARN this was previously accepted by the compiler but is being phased out
54 const I32_REF_I32_UNION: i32 = unsafe { Nonsense { int_32_ref: &3 }.int_32 };
55 //~^ ERROR any use of this value will cause an error
56 //~| WARN this was previously accepted by the compiler but is being phased out
58 const I32_REF_I64_UNION: i64 = unsafe { Nonsense { int_32_ref: &3 }.int_64 };
59 //~^ ERROR it is undefined behavior to use this value
61 const I32_REF_I128_UNION: i128 = unsafe { Nonsense { int_32_ref: &3 }.int_128 };
62 //~^ ERROR it is undefined behavior to use this value
64 const I32_REF_F32_UNION: f32 = unsafe { Nonsense { int_32_ref: &3 }.float_32 };
65 //~^ ERROR any use of this value will cause an error
66 //~| WARN this was previously accepted by the compiler but is being phased out
68 const I32_REF_F64_UNION: f64 = unsafe { Nonsense { int_32_ref: &3 }.float_64 };
69 //~^ ERROR it is undefined behavior to use this value
71 const I32_REF_BOOL_UNION: bool = unsafe { Nonsense { int_32_ref: &3 }.truthy_falsey };
72 //~^ ERROR any use of this value will cause an error
73 //~| WARN this was previously accepted by the compiler but is being phased out
75 const I32_REF_CHAR_UNION: char = unsafe { Nonsense { int_32_ref: &3 }.character };
76 //~^ ERROR any use of this value will cause an error
77 //~| WARN this was previously accepted by the compiler but is being phased out
79 const STR_U8_UNION: u8 = unsafe { Nonsense { stringy: "3" }.uint_8 };
80 //~^ ERROR any use of this value will cause an error
81 //~| WARN this was previously accepted by the compiler but is being phased out
83 const STR_U16_UNION: u16 = unsafe { Nonsense { stringy: "3" }.uint_16 };
84 //~^ ERROR any use of this value will cause an error
85 //~| WARN this was previously accepted by the compiler but is being phased out
87 const STR_U32_UNION: u32 = unsafe { Nonsense { stringy: "3" }.uint_32 };
88 //~^ ERROR any use of this value will cause an error
89 //~| WARN this was previously accepted by the compiler but is being phased out
91 const STR_U64_UNION: u64 = unsafe { Nonsense { stringy: "3" }.uint_64 };
92 //~^ ERROR it is undefined behavior to use this value
94 const STR_U128_UNION: u128 = unsafe { Nonsense { stringy: "3" }.uint_128 };
95 //~^ ERROR any use of this value will cause an error
96 //~| WARN this was previously accepted by the compiler but is being phased out
98 const STR_I8_UNION: i8 = unsafe { Nonsense { stringy: "3" }.int_8 };
99 //~^ ERROR any use of this value will cause an error
100 //~| WARN this was previously accepted by the compiler but is being phased out
102 const STR_I16_UNION: i16 = unsafe { Nonsense { stringy: "3" }.int_16 };
103 //~^ ERROR any use of this value will cause an error
104 //~| WARN this was previously accepted by the compiler but is being phased out
106 const STR_I32_UNION: i32 = unsafe { Nonsense { stringy: "3" }.int_32 };
107 //~^ ERROR any use of this value will cause an error
108 //~| WARN this was previously accepted by the compiler but is being phased out
110 const STR_I64_UNION: i64 = unsafe { Nonsense { stringy: "3" }.int_64 };
111 //~^ ERROR it is undefined behavior to use this value
113 const STR_I128_UNION: i128 = unsafe { Nonsense { stringy: "3" }.int_128 };
114 //~^ ERROR any use of this value will cause an error
115 //~| WARN this was previously accepted by the compiler but is being phased out
117 const STR_F32_UNION: f32 = unsafe { Nonsense { stringy: "3" }.float_32 };
118 //~^ ERROR any use of this value will cause an error
119 //~| WARN this was previously accepted by the compiler but is being phased out
121 const STR_F64_UNION: f64 = unsafe { Nonsense { stringy: "3" }.float_64 };
122 //~^ ERROR it is undefined behavior to use this value
124 const STR_BOOL_UNION: bool = unsafe { Nonsense { stringy: "3" }.truthy_falsey };
125 //~^ ERROR any use of this value will cause an error
126 //~| WARN this was previously accepted by the compiler but is being phased out
128 const STR_CHAR_UNION: char = unsafe { Nonsense { stringy: "3" }.character };
129 //~^ ERROR any use of this value will cause an error
130 //~| WARN this was previously accepted by the compiler but is being phased out