about summary refs log tree commit diff
path: root/compiler/rustc_codegen_gcc
diff options
context:
space:
mode:
authorbjorn3 <17426603+bjorn3@users.noreply.github.com>2024-12-13 09:52:38 +0000
committerbjorn3 <17426603+bjorn3@users.noreply.github.com>2025-05-28 20:55:00 +0000
commit0fd257d66ca761c5eba965fac52acffe3a8a7d96 (patch)
tree6311aa4556fa551783158748c2ccf3fc7f8c1603 /compiler/rustc_codegen_gcc
parenta4cb1c72c521a1300a3a88d46b721677e1380e3d (diff)
downloadrust-0fd257d66ca761c5eba965fac52acffe3a8a7d96.tar.gz
rust-0fd257d66ca761c5eba965fac52acffe3a8a7d96.zip
Remove a couple of uses of interior mutability around statics
Diffstat (limited to 'compiler/rustc_codegen_gcc')
-rw-r--r--compiler/rustc_codegen_gcc/src/consts.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_codegen_gcc/src/consts.rs b/compiler/rustc_codegen_gcc/src/consts.rs
index 8aed04c836a..fbf9e11c45e 100644
--- a/compiler/rustc_codegen_gcc/src/consts.rs
+++ b/compiler/rustc_codegen_gcc/src/consts.rs
@@ -67,7 +67,7 @@ impl<'gcc, 'tcx> StaticCodegenMethods for CodegenCx<'gcc, 'tcx> {
     }
 
     #[cfg_attr(not(feature = "master"), allow(unused_mut))]
-    fn codegen_static(&self, def_id: DefId) {
+    fn codegen_static(&mut self, def_id: DefId) {
         let attrs = self.tcx.codegen_fn_attrs(def_id);
 
         let Ok((value, alloc)) = codegen_static_initializer(self, def_id) else {
@@ -162,11 +162,11 @@ impl<'gcc, 'tcx> StaticCodegenMethods for CodegenCx<'gcc, 'tcx> {
     }
 
     /// Add a global value to a list to be stored in the `llvm.used` variable, an array of i8*.
-    fn add_used_global(&self, _global: RValue<'gcc>) {
+    fn add_used_global(&mut self, _global: RValue<'gcc>) {
         // TODO(antoyo)
     }
 
-    fn add_compiler_used_global(&self, global: RValue<'gcc>) {
+    fn add_compiler_used_global(&mut self, global: RValue<'gcc>) {
         // NOTE: seems like GCC does not make the distinction between compiler.used and used.
         self.add_used_global(global);
     }