2022-07-08 11:08:32 -05:00
|
|
|
//@compile-flags: -Zmiri-strict-provenance
|
2022-08-14 06:51:45 -05:00
|
|
|
#![feature(strict_provenance)]
|
2022-06-26 20:26:14 -05:00
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let addr = &0 as *const i32 as usize;
|
2022-08-14 06:51:45 -05:00
|
|
|
let _ptr = std::ptr::from_exposed_addr::<i32>(addr); //~ ERROR: integer-to-pointer casts and `ptr::from_exposed_addr` are not supported
|
2022-06-26 20:26:14 -05:00
|
|
|
}
|