Skip to content

Commit 62e0fdd

Browse files
committed
Rust: Attempt to fix the stack overflow when constructing the item array
Workaround from rust-lang/rust#53827
1 parent ecd790f commit 62e0fdd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/compiler/generator/rust.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1489,7 +1489,7 @@ fn generate_item_tree(
14891489
static ITEM_ARRAY : sp::OnceBox<
14901490
[sp::VOffset<#inner_component_id, sp::ItemVTable, sp::AllowPin>; #item_array_len]
14911491
> = sp::OnceBox::new();
1492-
&*ITEM_ARRAY.get_or_init(|| sp::Box::new([#(#item_array),*]))
1492+
&*ITEM_ARRAY.get_or_init(|| sp::vec![#(#item_array),*].into_boxed_slice().try_into().unwrap())
14931493
}
14941494
}
14951495

0 commit comments

Comments
 (0)