rustc_mir: don't run the deaggregator on arrays for now.
This commit is contained in:
parent
6195ad8654
commit
d773d95880
2 changed files with 6 additions and 3 deletions
|
|
@ -41,7 +41,11 @@ impl MirPass for Deaggregator {
|
|||
|
||||
let can_deaggregate = |statement: &Statement| {
|
||||
if let StatementKind::Assign(_, ref rhs) = statement.kind {
|
||||
if let Rvalue::Aggregate(..) = *rhs {
|
||||
if let Rvalue::Aggregate(ref kind, _) = *rhs {
|
||||
// FIXME(#48193) Deaggregate arrays when it's cheaper to do so.
|
||||
if let AggregateKind::Array(_) = **kind {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,8 +52,7 @@ fn main() {
|
|||
// ((_4 as A).0: i32) = move _5;
|
||||
// discriminant(_4) = 0;
|
||||
// ...
|
||||
// _0[0 of 1] = move _2;
|
||||
// _0[1 of 2] = move _4;
|
||||
// _0 = [move _2, move _4];
|
||||
// ...
|
||||
// return;
|
||||
// }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue