The following code should build, but for some reason it does not:
#![feature(const_raw_ptr_deref)]
#![feature(raw_ref_macros)]
use std::ptr;
const fn test_fn(x: *const i32) {
let x2 = unsafe { ptr::raw_const!(*x) };
}
Removing the const or adding a const_fn feature gate makes it build.
Cc @oli-obk @petrochenkov
The following code should build, but for some reason it does not:
Removing the
constor adding aconst_fnfeature gate makes it build.Cc @oli-obk @petrochenkov