Skip to content

Commit 737208d

Browse files
committed
Make some functions private that are only ever used in the same module
1 parent 05d3b63 commit 737208d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

compiler/rustc_codegen_gcc/src/consts.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ pub fn const_alloc_to_gcc<'gcc, 'tcx>(cx: &CodegenCx<'gcc, 'tcx>, alloc: ConstAl
337337
cx.const_struct(&llvals, true)
338338
}
339339

340-
pub fn codegen_static_initializer<'gcc, 'tcx>(cx: &CodegenCx<'gcc, 'tcx>, def_id: DefId) -> Result<(RValue<'gcc>, ConstAllocation<'tcx>), ErrorHandled> {
340+
fn codegen_static_initializer<'gcc, 'tcx>(cx: &CodegenCx<'gcc, 'tcx>, def_id: DefId) -> Result<(RValue<'gcc>, ConstAllocation<'tcx>), ErrorHandled> {
341341
let alloc = cx.tcx.eval_static_initializer(def_id)?;
342342
Ok((const_alloc_to_gcc(cx, alloc), alloc))
343343
}

compiler/rustc_codegen_llvm/src/consts.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ pub fn const_alloc_to_llvm<'ll>(cx: &CodegenCx<'ll, '_>, alloc: ConstAllocation<
114114
cx.const_struct(&llvals, true)
115115
}
116116

117-
pub fn codegen_static_initializer<'ll, 'tcx>(
117+
fn codegen_static_initializer<'ll, 'tcx>(
118118
cx: &CodegenCx<'ll, 'tcx>,
119119
def_id: DefId,
120120
) -> Result<(&'ll Value, ConstAllocation<'tcx>), ErrorHandled> {

0 commit comments

Comments
 (0)