remove label from Struct layout

This commit is contained in:
Folkert 2020-03-23 01:45:27 +01:00
parent e2a7c970bc
commit 46062439b5
7 changed files with 233 additions and 211 deletions

View file

@ -942,10 +942,7 @@ fn path_to_expr_help<'a>(
let (is_unwrapped, field_layouts) = match outer_layout {
Layout::Union(layouts) => (layouts.is_empty(), layouts[*tag_id as usize].to_vec()),
Layout::Struct(layouts) => (
true,
layouts.iter().map(|v| v.1.clone()).collect::<Vec<_>>(),
),
Layout::Struct(layouts) => (true, layouts.to_vec()),
other => (true, vec![other]),
};