Generate better function argument names in global_allocator expansion

This commit is contained in:
David Tolnay 2023-08-06 07:20:31 -07:00
parent bc720ad36b
commit 704aa56ba0
No known key found for this signature in database
GPG key ID: F9BA143B95FF6D82
5 changed files with 37 additions and 30 deletions

View file

@ -39,8 +39,8 @@ fn codegen_inner(
if kind == AllocatorKind::Default {
for method in ALLOCATOR_METHODS {
let mut arg_tys = Vec::with_capacity(method.inputs.len());
for ty in method.inputs.iter() {
match *ty {
for input in method.inputs.iter() {
match input.ty {
AllocatorTy::Layout => {
arg_tys.push(usize_ty); // size
arg_tys.push(usize_ty); // align