Skip to content

Commit 4d47f6d

Browse files
committed
Remove a couple of uses of interior mutability around statics
1 parent f6489c3 commit 4d47f6d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/consts.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ impl<'gcc, 'tcx> StaticCodegenMethods for CodegenCx<'gcc, 'tcx> {
6767
}
6868

6969
#[cfg_attr(not(feature = "master"), allow(unused_mut))]
70-
fn codegen_static(&self, def_id: DefId) {
70+
fn codegen_static(&mut self, def_id: DefId) {
7171
let attrs = self.tcx.codegen_fn_attrs(def_id);
7272

7373
let Ok((value, alloc)) = codegen_static_initializer(self, def_id) else {
@@ -162,11 +162,11 @@ impl<'gcc, 'tcx> StaticCodegenMethods for CodegenCx<'gcc, 'tcx> {
162162
}
163163

164164
/// Add a global value to a list to be stored in the `llvm.used` variable, an array of i8*.
165-
fn add_used_global(&self, _global: RValue<'gcc>) {
165+
fn add_used_global(&mut self, _global: RValue<'gcc>) {
166166
// TODO(antoyo)
167167
}
168168

169-
fn add_compiler_used_global(&self, global: RValue<'gcc>) {
169+
fn add_compiler_used_global(&mut self, global: RValue<'gcc>) {
170170
// NOTE: seems like GCC does not make the distinction between compiler.used and used.
171171
self.add_used_global(global);
172172
}

0 commit comments

Comments
 (0)