diff --git a/src/librustc_trans/closure.rs b/src/librustc_trans/closure.rs index c0692e8085fc2..d506b47407d7d 100644 --- a/src/librustc_trans/closure.rs +++ b/src/librustc_trans/closure.rs @@ -257,7 +257,7 @@ fn trans_fn_once_adapter_shim<'a, 'tcx>( // Create the by-value helper. let function_name = method_instance.symbol_name(ccx.shared()); - let lloncefn = declare::declare_fn(ccx, &function_name, llonce_fn_ty); + let lloncefn = declare::define_internal_fn(ccx, &function_name, llonce_fn_ty); attributes::set_frame_pointer_elimination(ccx, lloncefn); let (block_arena, fcx): (TypedArena<_>, FunctionContext);