compiler: use addr_of!
This commit is contained in:
parent
ff187a92d8
commit
613cb3262d
7 changed files with 9 additions and 9 deletions
|
@ -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()))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue