Skip to content

Commit 29212ec

Browse files
Assign internal linkage to autogenerated FnOnce::call_once() instances.
1 parent 75df685 commit 29212ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustc_trans/closure.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ fn trans_fn_once_adapter_shim<'a, 'tcx>(
257257

258258
// Create the by-value helper.
259259
let function_name = method_instance.symbol_name(ccx.shared());
260-
let lloncefn = declare::declare_fn(ccx, &function_name, llonce_fn_ty);
260+
let lloncefn = declare::define_internal_fn(ccx, &function_name, llonce_fn_ty);
261261
attributes::set_frame_pointer_elimination(ccx, lloncefn);
262262

263263
let (block_arena, fcx): (TypedArena<_>, FunctionContext);

0 commit comments

Comments
 (0)