This should be changed to return a () Operand::Const (not Rvalue::Use of that operand):
|
crate fn unit_rvalue(&mut self) -> Rvalue<'tcx> { |
|
Rvalue::Aggregate(box AggregateKind::Tuple, vec![]) |
|
} |
These two other places should switch to a () Rvalue::Use(Operand::Const(...)):
|
Rvalue::Aggregate(box AggregateKind::Tuple, vec![]), |
|
let unit = Rvalue::Aggregate(box AggregateKind::Tuple, vec![]); |
This issue has been assigned to @lcnr via this comment.
This should be changed to return a
()Operand::Const(notRvalue::Useof that operand):rust/src/librustc_mir_build/build/misc.rs
Lines 35 to 37 in 39b6253
These two other places should switch to a
()Rvalue::Use(Operand::Const(...)):rust/src/librustc_mir_build/build/cfg.rs
Line 66 in 39b6253
rust/src/librustc_mir/transform/promote_consts.rs
Line 838 in 39b6253
This issue has been assigned to @lcnr via this comment.