mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-03 00:24:34 +00:00
Add a comment
This commit is contained in:
parent
712ea2e1dc
commit
202b5ae4ee
1 changed files with 3 additions and 1 deletions
|
@ -243,7 +243,6 @@ fn struct_to_ast<'a>(
|
|||
let arena = env.arena;
|
||||
let subs = env.subs;
|
||||
let mut output = Vec::with_capacity_in(field_layouts.len(), &arena);
|
||||
let mut field_ptr = ptr;
|
||||
|
||||
// The fields, sorted alphabetically
|
||||
let sorted_fields = {
|
||||
|
@ -258,6 +257,9 @@ fn struct_to_ast<'a>(
|
|||
|
||||
debug_assert_eq!(sorted_fields.len(), field_layouts.len());
|
||||
|
||||
// We'll advance this as we iterate through the fields
|
||||
let mut field_ptr = ptr;
|
||||
|
||||
for ((label, field), field_layout) in sorted_fields.iter().zip(field_layouts.iter()) {
|
||||
let content = subs.get_without_compacting(*field.as_inner()).content;
|
||||
let loc_expr = &*arena.alloc(Located {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue