7 int_32_ref: &'static i32,
22 stringy: &'static str,
26 const I32_REF_USIZE_UNION: usize = unsafe { Nonsense { int_32_ref: &3 }.u };
27 //~^ ERROR it is undefined behavior to use this value
29 const I32_REF_U8_UNION: u8 = unsafe { Nonsense { int_32_ref: &3 }.uint_8 };
30 //~^ ERROR any use of this value will cause an error
31 //~| WARN this was previously accepted by the compiler but is being phased out
33 const I32_REF_U16_UNION: u16 = unsafe { Nonsense { int_32_ref: &3 }.uint_16 };
34 //~^ ERROR any use of this value will cause an error
35 //~| WARN this was previously accepted by the compiler but is being phased out
37 const I32_REF_U32_UNION: u32 = unsafe { Nonsense { int_32_ref: &3 }.uint_32 };
38 //~^ ERROR any use of this value will cause an error
39 //~| WARN this was previously accepted by the compiler but is being phased out
41 const I32_REF_U64_UNION: u64 = unsafe { Nonsense { int_32_ref: &3 }.uint_64 };
42 //~^ ERROR it is undefined behavior to use this value
44 const I32_REF_U128_UNION: u128 = unsafe { Nonsense { int_32_ref: &3 }.uint_128 };
45 //~^ ERROR it is undefined behavior to use this value
47 const I32_REF_I8_UNION: i8 = unsafe { Nonsense { int_32_ref: &3 }.int_8 };
48 //~^ ERROR any use of this value will cause an error
49 //~| WARN this was previously accepted by the compiler but is being phased out
51 const I32_REF_I16_UNION: i16 = unsafe { Nonsense { int_32_ref: &3 }.int_16 };
52 //~^ ERROR any use of this value will cause an error
53 //~| WARN this was previously accepted by the compiler but is being phased out
55 const I32_REF_I32_UNION: i32 = unsafe { Nonsense { int_32_ref: &3 }.int_32 };
56 //~^ ERROR any use of this value will cause an error
57 //~| WARN this was previously accepted by the compiler but is being phased out
59 const I32_REF_I64_UNION: i64 = unsafe { Nonsense { int_32_ref: &3 }.int_64 };
60 //~^ ERROR it is undefined behavior to use this value
62 const I32_REF_I128_UNION: i128 = unsafe { Nonsense { int_32_ref: &3 }.int_128 };
63 //~^ ERROR it is undefined behavior to use this value
65 const I32_REF_F32_UNION: f32 = unsafe { Nonsense { int_32_ref: &3 }.float_32 };
66 //~^ ERROR any use of this value will cause an error
67 //~| WARN this was previously accepted by the compiler but is being phased out
69 const I32_REF_F64_UNION: f64 = unsafe { Nonsense { int_32_ref: &3 }.float_64 };
70 //~^ ERROR it is undefined behavior to use this value
72 const I32_REF_BOOL_UNION: bool = unsafe { Nonsense { int_32_ref: &3 }.truthy_falsey };
73 //~^ ERROR any use of this value will cause an error
74 //~| WARN this was previously accepted by the compiler but is being phased out
76 const I32_REF_CHAR_UNION: char = unsafe { Nonsense { int_32_ref: &3 }.character };
77 //~^ ERROR any use of this value will cause an error
78 //~| WARN this was previously accepted by the compiler but is being phased out
80 const STR_U8_UNION: u8 = unsafe { Nonsense { stringy: "3" }.uint_8 };
81 //~^ ERROR any use of this value will cause an error
82 //~| WARN this was previously accepted by the compiler but is being phased out
84 const STR_U16_UNION: u16 = unsafe { Nonsense { stringy: "3" }.uint_16 };
85 //~^ ERROR any use of this value will cause an error
86 //~| WARN this was previously accepted by the compiler but is being phased out
88 const STR_U32_UNION: u32 = unsafe { Nonsense { stringy: "3" }.uint_32 };
89 //~^ ERROR any use of this value will cause an error
90 //~| WARN this was previously accepted by the compiler but is being phased out
92 const STR_U64_UNION: u64 = unsafe { Nonsense { stringy: "3" }.uint_64 };
93 //~^ ERROR it is undefined behavior to use this value
95 const STR_U128_UNION: u128 = unsafe { Nonsense { stringy: "3" }.uint_128 };
96 //~^ ERROR any use of this value will cause an error
97 //~| WARN this was previously accepted by the compiler but is being phased out
99 const STR_I8_UNION: i8 = unsafe { Nonsense { stringy: "3" }.int_8 };
100 //~^ ERROR any use of this value will cause an error
101 //~| WARN this was previously accepted by the compiler but is being phased out
103 const STR_I16_UNION: i16 = unsafe { Nonsense { stringy: "3" }.int_16 };
104 //~^ ERROR any use of this value will cause an error
105 //~| WARN this was previously accepted by the compiler but is being phased out
107 const STR_I32_UNION: i32 = unsafe { Nonsense { stringy: "3" }.int_32 };
108 //~^ ERROR any use of this value will cause an error
109 //~| WARN this was previously accepted by the compiler but is being phased out
111 const STR_I64_UNION: i64 = unsafe { Nonsense { stringy: "3" }.int_64 };
112 //~^ ERROR it is undefined behavior to use this value
114 const STR_I128_UNION: i128 = unsafe { Nonsense { stringy: "3" }.int_128 };
115 //~^ ERROR any use of this value will cause an error
116 //~| WARN this was previously accepted by the compiler but is being phased out
118 const STR_F32_UNION: f32 = unsafe { Nonsense { stringy: "3" }.float_32 };
119 //~^ ERROR any use of this value will cause an error
120 //~| WARN this was previously accepted by the compiler but is being phased out
122 const STR_F64_UNION: f64 = unsafe { Nonsense { stringy: "3" }.float_64 };
123 //~^ ERROR it is undefined behavior to use this value
125 const STR_BOOL_UNION: bool = unsafe { Nonsense { stringy: "3" }.truthy_falsey };
126 //~^ ERROR any use of this value will cause an error
127 //~| WARN this was previously accepted by the compiler but is being phased out
129 const STR_CHAR_UNION: char = unsafe { Nonsense { stringy: "3" }.character };
130 //~^ ERROR any use of this value will cause an error
131 //~| WARN this was previously accepted by the compiler but is being phased out