diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-09-27 19:08:00 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-27 19:08:00 +0200 |
| commit | a37f7f457faf81ae5e2edc8e18b1720ddb0b9ec2 (patch) | |
| tree | a6b592ad75e0ddf75901b8027bb04a29c1f55b51 /compiler/rustc_codegen_llvm/src | |
| parent | fd9d961ed803a4ee5e9943c0e8c24acde528a56d (diff) | |
| parent | 4160a54dc5751d08dd23c7e5b0dc6cbc0889ce32 (diff) | |
| download | rust-a37f7f457faf81ae5e2edc8e18b1720ddb0b9ec2.tar.gz rust-a37f7f457faf81ae5e2edc8e18b1720ddb0b9ec2.zip | |
Rollup merge of #130916 - cuviper:compiler-raw_ref_op, r=compiler-errors
Use `&raw` in the compiler Like #130865 did for the standard library, we can use `&raw` in the compiler now that stage0 supports it. Also like the other issue, I did not make any doc or test changes at this time.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/back/archive.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/lib.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/llvm_util.rs | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_codegen_llvm/src/back/archive.rs b/compiler/rustc_codegen_llvm/src/back/archive.rs index 1b4f6682af0..33a956e552f 100644 --- a/compiler/rustc_codegen_llvm/src/back/archive.rs +++ b/compiler/rustc_codegen_llvm/src/back/archive.rs @@ -123,7 +123,7 @@ fn get_llvm_object_symbols( llvm::LLVMRustGetSymbols( buf.as_ptr(), buf.len(), - std::ptr::addr_of_mut!(*state) as *mut c_void, + (&raw mut *state) as *mut c_void, callback, error_callback, ) diff --git a/compiler/rustc_codegen_llvm/src/lib.rs b/compiler/rustc_codegen_llvm/src/lib.rs index bdfc0f626f8..b85d28a2f1f 100644 --- a/compiler/rustc_codegen_llvm/src/lib.rs +++ b/compiler/rustc_codegen_llvm/src/lib.rs @@ -167,7 +167,7 @@ impl WriteBackendMethods for LlvmCodegenBackend { fn print_pass_timings(&self) { unsafe { let mut size = 0; - let cstr = llvm::LLVMRustPrintPassTimings(std::ptr::addr_of_mut!(size)); + let cstr = llvm::LLVMRustPrintPassTimings(&raw mut size); if cstr.is_null() { println!("failed to get pass timings"); } else { @@ -180,7 +180,7 @@ impl WriteBackendMethods for LlvmCodegenBackend { fn print_statistics(&self) { unsafe { let mut size = 0; - let cstr = llvm::LLVMRustPrintStatistics(std::ptr::addr_of_mut!(size)); + let cstr = llvm::LLVMRustPrintStatistics(&raw mut size); if cstr.is_null() { println!("failed to get pass stats"); } else { diff --git a/compiler/rustc_codegen_llvm/src/llvm_util.rs b/compiler/rustc_codegen_llvm/src/llvm_util.rs index 71fd7afb148..a2a5499597c 100644 --- a/compiler/rustc_codegen_llvm/src/llvm_util.rs +++ b/compiler/rustc_codegen_llvm/src/llvm_util.rs @@ -478,7 +478,7 @@ pub(crate) fn print(req: &PrintRequest, mut out: &mut String, sess: &Session) { &tm, cpu_cstring.as_ptr(), callback, - std::ptr::addr_of_mut!(out) as *mut c_void, + (&raw mut out) as *mut c_void, ); } } |
