diff options
| author | Zalathar <Zalathar@users.noreply.github.com> | 2025-08-15 19:54:59 +1000 |
|---|---|---|
| committer | Zalathar <Zalathar@users.noreply.github.com> | 2025-08-15 20:24:13 +1000 |
| commit | 61932e12221fb8a76a8dedc4a21e5f6e1e332d9d (patch) | |
| tree | 9ef78aa27433bc622e7e159e4c5f36226c126173 /compiler/rustc_codegen_llvm/src | |
| parent | 44f5ec7d56acb21cad9bcc0dbc13e70a749f35aa (diff) | |
| download | rust-61932e12221fb8a76a8dedc4a21e5f6e1e332d9d.tar.gz rust-61932e12221fb8a76a8dedc4a21e5f6e1e332d9d.zip | |
Avoid an unnecessary intermediate `&mut` reference
The `NonNull::as_mut` method returns a mut *reference*, rather than the mut *pointer* that is intended here.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/back/owned_target_machine.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_llvm/src/back/owned_target_machine.rs b/compiler/rustc_codegen_llvm/src/back/owned_target_machine.rs index 30b1c243de0..b073bafc0aa 100644 --- a/compiler/rustc_codegen_llvm/src/back/owned_target_machine.rs +++ b/compiler/rustc_codegen_llvm/src/back/owned_target_machine.rs @@ -99,7 +99,7 @@ impl Drop for OwnedTargetMachine { // llvm::LLVMRustCreateTargetMachine OwnedTargetMachine is not copyable so there is no // double free or use after free. unsafe { - llvm::LLVMRustDisposeTargetMachine(self.tm_unique.as_mut()); + llvm::LLVMRustDisposeTargetMachine(self.tm_unique.as_ptr()); } } } |
