We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8a09787 commit b91a7e5Copy full SHA for b91a7e5
src/librustc_mir/transform/deaggregator.rs
@@ -41,7 +41,11 @@ impl MirPass for Deaggregator {
41
42
let can_deaggregate = |statement: &Statement| {
43
if let StatementKind::Assign(_, ref rhs) = statement.kind {
44
- if let Rvalue::Aggregate(..) = *rhs {
+ if let Rvalue::Aggregate(ref kind, _) = *rhs {
45
+ // FIXME(#48193) Deaggregate arrays when it's cheaper to do so.
46
+ if let AggregateKind::Array(_) = **kind {
47
+ return false;
48
+ }
49
return true;
50
}
51
src/test/mir-opt/deaggregator_test_multiple.rs
@@ -52,8 +52,7 @@ fn main() {
52
// ((_4 as A).0: i32) = move _5;
53
// discriminant(_4) = 0;
54
// ...
55
-// _0[0 of 1] = move _2;
56
-// _0[1 of 2] = move _4;
+// _0 = [move _2, move _4];
57
58
// return;
59
// }
0 commit comments