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

@ -34,8 +34,8 @@ pub(crate) unsafe fn codegen(
if kind == AllocatorKind::Default {
for method in ALLOCATOR_METHODS {
let mut args = 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 => {
args.push(usize); // size
args.push(usize); // align