diff options
| author | bors <bors@rust-lang.org> | 2024-10-03 06:20:27 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-10-03 06:20:27 +0000 |
| commit | bf71d65980c7005aa30f6f057aaa2e681b703400 (patch) | |
| tree | 44a406e1ded013292644eee72c9921c76fb4f706 /compiler/rustc_data_structures/src | |
| parent | 52aa98a994f84e02bae6a7573b8c81bb8add2b98 (diff) | |
| parent | 9b35886adfe5da4163e95508f586dc071eec4d0f (diff) | |
| download | rust-bf71d65980c7005aa30f6f057aaa2e681b703400.tar.gz rust-bf71d65980c7005aa30f6f057aaa2e681b703400.zip | |
Auto merge of #3935 - RalfJung:rustup, r=RalfJung
Rustup
Diffstat (limited to 'compiler/rustc_data_structures/src')
| -rw-r--r-- | compiler/rustc_data_structures/src/sync.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_data_structures/src/sync.rs b/compiler/rustc_data_structures/src/sync.rs index 6df94bc0e94..a3491dbfec7 100644 --- a/compiler/rustc_data_structures/src/sync.rs +++ b/compiler/rustc_data_structures/src/sync.rs @@ -437,7 +437,7 @@ impl<T> RwLock<T> { #[inline(always)] pub fn leak(&self) -> &T { let guard = self.read(); - let ret = unsafe { &*std::ptr::addr_of!(*guard) }; + let ret = unsafe { &*(&raw const *guard) }; std::mem::forget(guard); ret } |
