about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm
diff options
context:
space:
mode:
authorbjorn3 <17426603+bjorn3@users.noreply.github.com>2025-01-09 18:21:43 +0000
committerbjorn3 <17426603+bjorn3@users.noreply.github.com>2025-05-28 20:55:00 +0000
commit669e2ea8487787c2641b50d958cd3e01c7e762ef (patch)
tree82e6ad3dfe1f7d0f8e7c02a24582bc85eb103f33 /compiler/rustc_codegen_llvm
parent0809b41cd9c0d594c724ffbc9b21abf889ab174f (diff)
downloadrust-669e2ea8487787c2641b50d958cd3e01c7e762ef.tar.gz
rust-669e2ea8487787c2641b50d958cd3e01c7e762ef.zip
Make predefine methods take &mut self
Diffstat (limited to 'compiler/rustc_codegen_llvm')
-rw-r--r--compiler/rustc_codegen_llvm/src/base.rs2
-rw-r--r--compiler/rustc_codegen_llvm/src/mono_item.rs4
2 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_codegen_llvm/src/base.rs b/compiler/rustc_codegen_llvm/src/base.rs
index 2eb11766869..5dda836988c 100644
--- a/compiler/rustc_codegen_llvm/src/base.rs
+++ b/compiler/rustc_codegen_llvm/src/base.rs
@@ -87,7 +87,7 @@ pub(crate) fn compile_codegen_unit(
             let mono_items = cx.codegen_unit.items_in_deterministic_order(cx.tcx);
             for &(mono_item, data) in &mono_items {
                 mono_item.predefine::<Builder<'_, '_, '_>>(
-                    &cx,
+                    &mut cx,
                     cgu_name.as_str(),
                     data.linkage,
                     data.visibility,
diff --git a/compiler/rustc_codegen_llvm/src/mono_item.rs b/compiler/rustc_codegen_llvm/src/mono_item.rs
index fdf62a08065..3f38e1e191b 100644
--- a/compiler/rustc_codegen_llvm/src/mono_item.rs
+++ b/compiler/rustc_codegen_llvm/src/mono_item.rs
@@ -16,7 +16,7 @@ use crate::{base, llvm};
 
 impl<'tcx> PreDefineCodegenMethods<'tcx> for CodegenCx<'_, 'tcx> {
     fn predefine_static(
-        &self,
+        &mut self,
         def_id: DefId,
         linkage: Linkage,
         visibility: Visibility,
@@ -44,7 +44,7 @@ impl<'tcx> PreDefineCodegenMethods<'tcx> for CodegenCx<'_, 'tcx> {
     }
 
     fn predefine_fn(
-        &self,
+        &mut self,
         instance: Instance<'tcx>,
         linkage: Linkage,
         visibility: Visibility,