diff options
Diffstat (limited to 'src/librustc_codegen_llvm/allocator.rs')
| -rw-r--r-- | src/librustc_codegen_llvm/allocator.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustc_codegen_llvm/allocator.rs b/src/librustc_codegen_llvm/allocator.rs index 0beb8a8844c..7c237407c8f 100644 --- a/src/librustc_codegen_llvm/allocator.rs +++ b/src/librustc_codegen_llvm/allocator.rs @@ -33,7 +33,7 @@ pub(crate) unsafe fn codegen(tcx: TyCtxt, mods: &ModuleLlvm, kind: AllocatorKind let void = llvm::LLVMVoidTypeInContext(llcx); for method in ALLOCATOR_METHODS { - let mut args = Vec::new(); + let mut args = Vec::with_capacity(method.inputs.len()); for ty in method.inputs.iter() { match *ty { AllocatorTy::Layout => { |
