2018-08-26 08:19:34 -05:00
|
|
|
error: any use of this value will cause an error
|
2019-03-10 19:28:52 -05:00
|
|
|
--> $DIR/const_raw_ptr_ops.rs:6:26
|
2018-08-03 06:27:35 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | const X: bool = unsafe { &1 as *const i32 == &2 as *const i32 };
|
2019-03-10 19:28:52 -05:00
|
|
|
| -------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
|
2018-12-07 11:26:46 -06:00
|
|
|
| |
|
|
|
|
| "pointer arithmetic or comparison" needs an rfc before being allowed inside constants
|
2018-08-03 06:27:35 -05:00
|
|
|
|
|
2019-07-16 15:17:38 -05:00
|
|
|
= note: `#[deny(const_err)]` on by default
|
2018-08-03 06:27:35 -05:00
|
|
|
|
2019-07-24 17:06:47 -05:00
|
|
|
error: any use of this value will cause an error
|
|
|
|
--> $DIR/const_raw_ptr_ops.rs:8:27
|
|
|
|
|
|
|
|
|
LL | const X2: bool = unsafe { 42 as *const i32 == 43 as *const i32 };
|
|
|
|
| --------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
|
|
|
|
| |
|
|
|
|
| "pointer arithmetic or comparison" needs an rfc before being allowed inside constants
|
|
|
|
|
2018-08-26 08:19:34 -05:00
|
|
|
error: any use of this value will cause an error
|
2019-03-10 19:28:52 -05:00
|
|
|
--> $DIR/const_raw_ptr_ops.rs:12:28
|
2018-08-03 06:27:35 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | const Y2: usize = unsafe { &1 as *const i32 as usize + 1 };
|
2019-07-24 17:06:47 -05:00
|
|
|
| ---------------------------^^^^^^^^^^^^^^^^^^^^^^^^^-------
|
2018-12-07 11:26:46 -06:00
|
|
|
| |
|
2019-07-24 17:06:47 -05:00
|
|
|
| "pointer-to-integer cast" needs an rfc before being allowed inside constants
|
2018-08-03 06:27:35 -05:00
|
|
|
|
2018-08-26 08:19:34 -05:00
|
|
|
error: any use of this value will cause an error
|
2019-03-10 19:28:52 -05:00
|
|
|
--> $DIR/const_raw_ptr_ops.rs:16:26
|
2018-08-03 06:27:35 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | const Z2: i32 = unsafe { *(42 as *const i32) };
|
2019-03-10 19:28:52 -05:00
|
|
|
| -------------------------^^^^^^^^^^^^^^^^^^^---
|
2018-08-03 06:27:35 -05:00
|
|
|
| |
|
2020-03-08 13:44:09 -05:00
|
|
|
| unable to turn these bytes into a pointer
|
2018-08-03 06:27:35 -05:00
|
|
|
|
2018-08-26 08:19:34 -05:00
|
|
|
error: any use of this value will cause an error
|
2019-03-10 19:28:52 -05:00
|
|
|
--> $DIR/const_raw_ptr_ops.rs:17:26
|
2018-08-03 06:27:35 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | const Z3: i32 = unsafe { *(44 as *const i32) };
|
2019-03-10 19:28:52 -05:00
|
|
|
| -------------------------^^^^^^^^^^^^^^^^^^^---
|
2018-08-03 06:27:35 -05:00
|
|
|
| |
|
2020-03-08 13:44:09 -05:00
|
|
|
| unable to turn these bytes into a pointer
|
2018-08-03 06:27:35 -05:00
|
|
|
|
2019-07-24 17:06:47 -05:00
|
|
|
error: aborting due to 5 previous errors
|
2018-08-03 06:27:35 -05:00
|
|
|
|