1
Fork 0

Use FieldIdx in FieldsShape

Finally got to the main motivating example from the MCP :)
This commit is contained in:
Scott McMurray 2023-04-02 23:21:09 -07:00
parent bf41e753ec
commit 21bb8ef24e
7 changed files with 133 additions and 101 deletions

View file

@ -287,7 +287,7 @@ impl<'tcx> TransformVisitor<'tcx> {
statements.push(Statement {
kind: StatementKind::Assign(Box::new((
Place::return_place(),
Rvalue::Aggregate(Box::new(kind), IndexVec::from_iter([val])),
Rvalue::Aggregate(Box::new(kind), [val].into()),
))),
source_info,
});