diff options
| author | Josh Stone <jistone@redhat.com> | 2024-08-20 14:04:48 -0700 |
|---|---|---|
| committer | Josh Stone <jistone@redhat.com> | 2024-08-20 14:04:48 -0700 |
| commit | e424e7fcaacf1bd26584a2ecf50299c0058fbba5 (patch) | |
| tree | 8b91b5746074500b9aab27122bce74464057f260 /compiler/rustc_codegen_llvm/src/consts.rs | |
| parent | a971212545766fdfe0dd68e5d968133f79944a19 (diff) | |
| download | rust-e424e7fcaacf1bd26584a2ecf50299c0058fbba5.tar.gz rust-e424e7fcaacf1bd26584a2ecf50299c0058fbba5.zip | |
Avoid extra `cast()`s after `CStr::as_ptr()`
These used to be `&str` literals that did need a pointer cast, but that became a no-op after switching to `c""` literals in #118566.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/consts.rs')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/consts.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_llvm/src/consts.rs b/compiler/rustc_codegen_llvm/src/consts.rs index 75b298f14ca..a764b263ec7 100644 --- a/compiler/rustc_codegen_llvm/src/consts.rs +++ b/compiler/rustc_codegen_llvm/src/consts.rs @@ -525,7 +525,7 @@ impl<'ll> CodegenCx<'ll, '_> { let val = llvm::LLVMMetadataAsValue(self.llcx, meta); llvm::LLVMAddNamedMetadataOperand( self.llmod, - c"wasm.custom_sections".as_ptr().cast(), + c"wasm.custom_sections".as_ptr(), val, ); } |
