about summary refs log tree commit diff
path: root/compiler/rustc_mir_transform/src
diff options
context:
space:
mode:
authorScott McMurray <scottmcm@users.noreply.github.com>2023-04-02 23:21:09 -0700
committerScott McMurray <scottmcm@users.noreply.github.com>2023-04-04 12:38:06 -0700
commit21bb8ef24eaf9d1f46d35f188687dfc73d72c204 (patch)
tree345509c0b2fcfb3e50ecac6f68b247bb47c47187 /compiler/rustc_mir_transform/src
parentbf41e753ec60da69f2393850ec5035063a573d95 (diff)
downloadrust-21bb8ef24eaf9d1f46d35f188687dfc73d72c204.tar.gz
rust-21bb8ef24eaf9d1f46d35f188687dfc73d72c204.zip
Use `FieldIdx` in `FieldsShape`
Finally got to the main motivating example from the MCP :)
Diffstat (limited to 'compiler/rustc_mir_transform/src')
-rw-r--r--compiler/rustc_mir_transform/src/generator.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_mir_transform/src/generator.rs b/compiler/rustc_mir_transform/src/generator.rs
index af6422c7246..8f29066b6e2 100644
--- a/compiler/rustc_mir_transform/src/generator.rs
+++ b/compiler/rustc_mir_transform/src/generator.rs
@@ -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,
         });