]> git.lizzy.rs Git - rust.git/blob - tests/ui/consts/const-eval/const-pointer-values-in-various-types.64bit.stderr
Move /src/test to /tests
[rust.git] / tests / ui / consts / const-eval / const-pointer-values-in-various-types.64bit.stderr
1 error[E0080]: evaluation of constant value failed
2   --> $DIR/const-pointer-values-in-various-types.rs:26:49
3    |
4 LL |     const I32_REF_USIZE_UNION: usize = unsafe { Nonsense { int_32_ref: &3 }.u };
5    |                                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
6    |
7    = help: this code performed an operation that depends on the underlying bytes representing a pointer
8    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
9
10 error[E0080]: evaluation of constant value failed
11   --> $DIR/const-pointer-values-in-various-types.rs:29:43
12    |
13 LL |     const I32_REF_U8_UNION: u8 = unsafe { Nonsense { int_32_ref: &3 }.uint_8 };
14    |                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
15    |
16    = help: this code performed an operation that depends on the underlying bytes representing a pointer
17    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
18
19 error[E0080]: evaluation of constant value failed
20   --> $DIR/const-pointer-values-in-various-types.rs:32:45
21    |
22 LL |     const I32_REF_U16_UNION: u16 = unsafe { Nonsense { int_32_ref: &3 }.uint_16 };
23    |                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
24    |
25    = help: this code performed an operation that depends on the underlying bytes representing a pointer
26    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
27
28 error[E0080]: evaluation of constant value failed
29   --> $DIR/const-pointer-values-in-various-types.rs:35:45
30    |
31 LL |     const I32_REF_U32_UNION: u32 = unsafe { Nonsense { int_32_ref: &3 }.uint_32 };
32    |                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
33    |
34    = help: this code performed an operation that depends on the underlying bytes representing a pointer
35    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
36
37 error[E0080]: evaluation of constant value failed
38   --> $DIR/const-pointer-values-in-various-types.rs:38:45
39    |
40 LL |     const I32_REF_U64_UNION: u64 = unsafe { Nonsense { int_32_ref: &3 }.uint_64 };
41    |                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
42    |
43    = help: this code performed an operation that depends on the underlying bytes representing a pointer
44    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
45
46 error[E0080]: evaluation of constant value failed
47   --> $DIR/const-pointer-values-in-various-types.rs:41:47
48    |
49 LL |     const I32_REF_U128_UNION: u128 = unsafe { Nonsense { int_32_ref: &3 }.uint_128 };
50    |                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ using uninitialized data, but this operation requires initialized memory
51
52 error[E0080]: evaluation of constant value failed
53   --> $DIR/const-pointer-values-in-various-types.rs:45:43
54    |
55 LL |     const I32_REF_I8_UNION: i8 = unsafe { Nonsense { int_32_ref: &3 }.int_8 };
56    |                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
57    |
58    = help: this code performed an operation that depends on the underlying bytes representing a pointer
59    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
60
61 error[E0080]: evaluation of constant value failed
62   --> $DIR/const-pointer-values-in-various-types.rs:48:45
63    |
64 LL |     const I32_REF_I16_UNION: i16 = unsafe { Nonsense { int_32_ref: &3 }.int_16 };
65    |                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
66    |
67    = help: this code performed an operation that depends on the underlying bytes representing a pointer
68    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
69
70 error[E0080]: evaluation of constant value failed
71   --> $DIR/const-pointer-values-in-various-types.rs:51:45
72    |
73 LL |     const I32_REF_I32_UNION: i32 = unsafe { Nonsense { int_32_ref: &3 }.int_32 };
74    |                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
75    |
76    = help: this code performed an operation that depends on the underlying bytes representing a pointer
77    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
78
79 error[E0080]: evaluation of constant value failed
80   --> $DIR/const-pointer-values-in-various-types.rs:54:45
81    |
82 LL |     const I32_REF_I64_UNION: i64 = unsafe { Nonsense { int_32_ref: &3 }.int_64 };
83    |                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
84    |
85    = help: this code performed an operation that depends on the underlying bytes representing a pointer
86    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
87
88 error[E0080]: evaluation of constant value failed
89   --> $DIR/const-pointer-values-in-various-types.rs:57:47
90    |
91 LL |     const I32_REF_I128_UNION: i128 = unsafe { Nonsense { int_32_ref: &3 }.int_128 };
92    |                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ using uninitialized data, but this operation requires initialized memory
93
94 error[E0080]: evaluation of constant value failed
95   --> $DIR/const-pointer-values-in-various-types.rs:61:45
96    |
97 LL |     const I32_REF_F32_UNION: f32 = unsafe { Nonsense { int_32_ref: &3 }.float_32 };
98    |                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
99    |
100    = help: this code performed an operation that depends on the underlying bytes representing a pointer
101    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
102
103 error[E0080]: evaluation of constant value failed
104   --> $DIR/const-pointer-values-in-various-types.rs:64:45
105    |
106 LL |     const I32_REF_F64_UNION: f64 = unsafe { Nonsense { int_32_ref: &3 }.float_64 };
107    |                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
108    |
109    = help: this code performed an operation that depends on the underlying bytes representing a pointer
110    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
111
112 error[E0080]: evaluation of constant value failed
113   --> $DIR/const-pointer-values-in-various-types.rs:67:47
114    |
115 LL |     const I32_REF_BOOL_UNION: bool = unsafe { Nonsense { int_32_ref: &3 }.truthy_falsey };
116    |                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
117    |
118    = help: this code performed an operation that depends on the underlying bytes representing a pointer
119    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
120
121 error[E0080]: evaluation of constant value failed
122   --> $DIR/const-pointer-values-in-various-types.rs:70:47
123    |
124 LL |     const I32_REF_CHAR_UNION: char = unsafe { Nonsense { int_32_ref: &3 }.character };
125    |                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
126    |
127    = help: this code performed an operation that depends on the underlying bytes representing a pointer
128    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
129
130 error[E0080]: evaluation of constant value failed
131   --> $DIR/const-pointer-values-in-various-types.rs:73:39
132    |
133 LL |     const STR_U8_UNION: u8 = unsafe { Nonsense { stringy: "3" }.uint_8 };
134    |                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
135    |
136    = help: this code performed an operation that depends on the underlying bytes representing a pointer
137    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
138
139 error[E0080]: evaluation of constant value failed
140   --> $DIR/const-pointer-values-in-various-types.rs:76:41
141    |
142 LL |     const STR_U16_UNION: u16 = unsafe { Nonsense { stringy: "3" }.uint_16 };
143    |                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
144    |
145    = help: this code performed an operation that depends on the underlying bytes representing a pointer
146    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
147
148 error[E0080]: evaluation of constant value failed
149   --> $DIR/const-pointer-values-in-various-types.rs:79:41
150    |
151 LL |     const STR_U32_UNION: u32 = unsafe { Nonsense { stringy: "3" }.uint_32 };
152    |                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
153    |
154    = help: this code performed an operation that depends on the underlying bytes representing a pointer
155    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
156
157 error[E0080]: evaluation of constant value failed
158   --> $DIR/const-pointer-values-in-various-types.rs:82:41
159    |
160 LL |     const STR_U64_UNION: u64 = unsafe { Nonsense { stringy: "3" }.uint_64 };
161    |                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
162    |
163    = help: this code performed an operation that depends on the underlying bytes representing a pointer
164    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
165
166 error[E0080]: evaluation of constant value failed
167   --> $DIR/const-pointer-values-in-various-types.rs:85:43
168    |
169 LL |     const STR_U128_UNION: u128 = unsafe { Nonsense { stringy: "3" }.uint_128 };
170    |                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
171    |
172    = help: this code performed an operation that depends on the underlying bytes representing a pointer
173    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
174
175 error[E0080]: evaluation of constant value failed
176   --> $DIR/const-pointer-values-in-various-types.rs:88:39
177    |
178 LL |     const STR_I8_UNION: i8 = unsafe { Nonsense { stringy: "3" }.int_8 };
179    |                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
180    |
181    = help: this code performed an operation that depends on the underlying bytes representing a pointer
182    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
183
184 error[E0080]: evaluation of constant value failed
185   --> $DIR/const-pointer-values-in-various-types.rs:91:41
186    |
187 LL |     const STR_I16_UNION: i16 = unsafe { Nonsense { stringy: "3" }.int_16 };
188    |                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
189    |
190    = help: this code performed an operation that depends on the underlying bytes representing a pointer
191    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
192
193 error[E0080]: evaluation of constant value failed
194   --> $DIR/const-pointer-values-in-various-types.rs:94:41
195    |
196 LL |     const STR_I32_UNION: i32 = unsafe { Nonsense { stringy: "3" }.int_32 };
197    |                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
198    |
199    = help: this code performed an operation that depends on the underlying bytes representing a pointer
200    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
201
202 error[E0080]: evaluation of constant value failed
203   --> $DIR/const-pointer-values-in-various-types.rs:97:41
204    |
205 LL |     const STR_I64_UNION: i64 = unsafe { Nonsense { stringy: "3" }.int_64 };
206    |                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
207    |
208    = help: this code performed an operation that depends on the underlying bytes representing a pointer
209    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
210
211 error[E0080]: evaluation of constant value failed
212   --> $DIR/const-pointer-values-in-various-types.rs:100:43
213    |
214 LL |     const STR_I128_UNION: i128 = unsafe { Nonsense { stringy: "3" }.int_128 };
215    |                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
216    |
217    = help: this code performed an operation that depends on the underlying bytes representing a pointer
218    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
219
220 error[E0080]: evaluation of constant value failed
221   --> $DIR/const-pointer-values-in-various-types.rs:103:41
222    |
223 LL |     const STR_F32_UNION: f32 = unsafe { Nonsense { stringy: "3" }.float_32 };
224    |                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
225    |
226    = help: this code performed an operation that depends on the underlying bytes representing a pointer
227    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
228
229 error[E0080]: evaluation of constant value failed
230   --> $DIR/const-pointer-values-in-various-types.rs:106:41
231    |
232 LL |     const STR_F64_UNION: f64 = unsafe { Nonsense { stringy: "3" }.float_64 };
233    |                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
234    |
235    = help: this code performed an operation that depends on the underlying bytes representing a pointer
236    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
237
238 error[E0080]: evaluation of constant value failed
239   --> $DIR/const-pointer-values-in-various-types.rs:109:43
240    |
241 LL |     const STR_BOOL_UNION: bool = unsafe { Nonsense { stringy: "3" }.truthy_falsey };
242    |                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
243    |
244    = help: this code performed an operation that depends on the underlying bytes representing a pointer
245    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
246
247 error[E0080]: evaluation of constant value failed
248   --> $DIR/const-pointer-values-in-various-types.rs:112:43
249    |
250 LL |     const STR_CHAR_UNION: char = unsafe { Nonsense { stringy: "3" }.character };
251    |                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
252    |
253    = help: this code performed an operation that depends on the underlying bytes representing a pointer
254    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
255
256 error: aborting due to 29 previous errors
257
258 For more information about this error, try `rustc --explain E0080`.