2018-08-26 08:19:34 -05:00
|
|
|
error: any use of this value will cause an error
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/const_raw_ptr_ops.rs:6:1
|
2018-08-03 06:27:35 -05:00
|
|
|
|
|
2018-08-26 08:19:34 -05:00
|
|
|
LL | const X: bool = &1 as *const i32 == &2 as *const i32; //~ ERROR any use of this value will cause
|
2018-08-03 06:27:35 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^------------------------------------^
|
|
|
|
| |
|
|
|
|
| "pointer arithmetic or comparison" needs an rfc before being allowed inside constants
|
|
|
|
|
|
|
|
|
= note: #[deny(const_err)] on by default
|
|
|
|
|
2018-08-26 08:19:34 -05:00
|
|
|
error: any use of this value will cause an error
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/const_raw_ptr_ops.rs:12:1
|
2018-08-03 06:27:35 -05:00
|
|
|
|
|
2018-08-26 08:19:34 -05:00
|
|
|
LL | const Y2: usize = &1 as *const i32 as usize + 1; //~ ERROR any use of this value will cause
|
2018-08-03 06:27:35 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^-----------------------------^
|
|
|
|
| |
|
|
|
|
| "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
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/const_raw_ptr_ops.rs:16:1
|
2018-08-03 06:27:35 -05:00
|
|
|
|
|
2018-08-26 08:19:34 -05:00
|
|
|
LL | const Z2: i32 = unsafe { *(42 as *const i32) }; //~ ERROR any use of this value will cause
|
2018-08-03 06:27:35 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^-------------------^^^
|
|
|
|
| |
|
2018-08-17 14:25:59 -05:00
|
|
|
| a memory access tried to interpret some bytes as 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
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/const_raw_ptr_ops.rs:17:1
|
2018-08-03 06:27:35 -05:00
|
|
|
|
|
2018-08-26 08:19:34 -05:00
|
|
|
LL | const Z3: i32 = unsafe { *(44 as *const i32) }; //~ ERROR any use of this value will cause
|
2018-08-03 06:27:35 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^-------------------^^^
|
|
|
|
| |
|
|
|
|
| a memory access tried to interpret some bytes as a pointer
|
|
|
|
|
|
|
|
error: aborting due to 4 previous errors
|
|
|
|
|