Put a DefId in AggregateKind.
This commit is contained in:
parent
f3126500f2
commit
0241c29123
10 changed files with 33 additions and 17 deletions
|
@ -439,10 +439,14 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
|
|||
// We implicitly set the discriminant to 0. See
|
||||
// librustc_mir/transform/deaggregator.rs for details.
|
||||
let movability = movability.unwrap();
|
||||
Box::new(AggregateKind::Generator(closure_id, substs, movability))
|
||||
Box::new(AggregateKind::Generator(
|
||||
closure_id.to_def_id(),
|
||||
substs,
|
||||
movability,
|
||||
))
|
||||
}
|
||||
UpvarSubsts::Closure(substs) => {
|
||||
Box::new(AggregateKind::Closure(closure_id, substs))
|
||||
Box::new(AggregateKind::Closure(closure_id.to_def_id(), substs))
|
||||
}
|
||||
};
|
||||
block.and(Rvalue::Aggregate(result, operands))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue