|
| 1 | +error[E0658]: casting pointers to integers in constants is unstable |
| 2 | + --> $DIR/cast-ptr-to-int-const.rs:8:9 |
| 3 | + | |
| 4 | +LL | main as usize |
| 5 | + | ^^^^^^^^^^^^^ |
| 6 | + | |
| 7 | + = note: see issue #51910 <https://github.com/rust-lang/rust/issues/51910> for more information |
| 8 | + = help: add `#![feature(const_raw_ptr_to_usize_cast)]` to the crate attributes to enable |
| 9 | + |
| 10 | +error[E0658]: casting pointers to integers in constants is unstable |
| 11 | + --> $DIR/cast-ptr-to-int-const.rs:12:9 |
| 12 | + | |
| 13 | +LL | &Y as *const u32 as usize |
| 14 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 15 | + | |
| 16 | + = note: see issue #51910 <https://github.com/rust-lang/rust/issues/51910> for more information |
| 17 | + = help: add `#![feature(const_raw_ptr_to_usize_cast)]` to the crate attributes to enable |
| 18 | + |
| 19 | +error[E0658]: casting pointers to integers in constants is unstable |
| 20 | + --> $DIR/cast-ptr-to-int-const.rs:16:9 |
| 21 | + | |
| 22 | +LL | &Y as *const u32 as usize |
| 23 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 24 | + | |
| 25 | + = note: see issue #51910 <https://github.com/rust-lang/rust/issues/51910> for more information |
| 26 | + = help: add `#![feature(const_raw_ptr_to_usize_cast)]` to the crate attributes to enable |
| 27 | + |
| 28 | +error[E0658]: casting pointers to integers in constant functions is unstable |
| 29 | + --> $DIR/cast-ptr-to-int-const.rs:23:5 |
| 30 | + | |
| 31 | +LL | &0 as *const i32 as usize |
| 32 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 33 | + | |
| 34 | + = note: see issue #51910 <https://github.com/rust-lang/rust/issues/51910> for more information |
| 35 | + = help: add `#![feature(const_raw_ptr_to_usize_cast)]` to the crate attributes to enable |
| 36 | + |
| 37 | +error: aborting due to 4 previous errors |
| 38 | + |
| 39 | +For more information about this error, try `rustc --explain E0658`. |
0 commit comments