1
Fork 0

compiler: use addr_of!

This commit is contained in:
Pavel Grigorenko 2024-02-24 16:47:34 +03:00
parent ff187a92d8
commit 613cb3262d
No known key found for this signature in database
GPG key ID: 52BFCC6ED389F777
7 changed files with 9 additions and 9 deletions

View file

@ -208,7 +208,7 @@ where
if TLV.is_set() {
Err(Error::from("StableMIR already running"))
} else {
let ptr: *const () = &context as *const &_ as _;
let ptr: *const () = std::ptr::addr_of!(context) as _;
TLV.set(&Cell::new(ptr), || Ok(f()))
}
}