diff options
| author | Michael Goulet <michael@errs.io> | 2024-07-14 14:27:57 -0400 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2024-07-16 00:02:44 -0400 |
| commit | 28503d69ac204ff208d115aea30dc09d6fca8728 (patch) | |
| tree | 10c775d65355d7a0a32200978a90fbbc20ad5ca4 /compiler/rustc_codegen_llvm/src/lib.rs | |
| parent | 71eb49c318c3e7c25a6306414298d78accd164df (diff) | |
| download | rust-28503d69ac204ff208d115aea30dc09d6fca8728.tar.gz rust-28503d69ac204ff208d115aea30dc09d6fca8728.zip | |
Fix unsafe_op_in_unsafe_fn in compiler
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/lib.rs')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/lib.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_codegen_llvm/src/lib.rs b/compiler/rustc_codegen_llvm/src/lib.rs index ed0989a0ba4..a96993b9aba 100644 --- a/compiler/rustc_codegen_llvm/src/lib.rs +++ b/compiler/rustc_codegen_llvm/src/lib.rs @@ -216,7 +216,7 @@ impl WriteBackendMethods for LlvmCodegenBackend { module: &ModuleCodegen<Self::Module>, config: &ModuleConfig, ) -> Result<(), FatalError> { - back::write::optimize(cgcx, dcx, module, config) + unsafe { back::write::optimize(cgcx, dcx, module, config) } } fn optimize_fat( cgcx: &CodegenContext<Self>, @@ -230,7 +230,7 @@ impl WriteBackendMethods for LlvmCodegenBackend { cgcx: &CodegenContext<Self>, thin: ThinModule<Self>, ) -> Result<ModuleCodegen<Self::Module>, FatalError> { - back::lto::optimize_thin_module(thin, cgcx) + unsafe { back::lto::optimize_thin_module(thin, cgcx) } } unsafe fn codegen( cgcx: &CodegenContext<Self>, @@ -238,7 +238,7 @@ impl WriteBackendMethods for LlvmCodegenBackend { module: ModuleCodegen<Self::Module>, config: &ModuleConfig, ) -> Result<CompiledModule, FatalError> { - back::write::codegen(cgcx, dcx, module, config) + unsafe { back::write::codegen(cgcx, dcx, module, config) } } fn prepare_thin( module: ModuleCodegen<Self::Module>, |
