Skip to content

Commit 39a114e

Browse files
committed
Explain why we are creating an aggregate constant
1 parent 03d38d4 commit 39a114e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/librustc_mir/transform/const_prop.rs

+2
Original file line numberDiff line numberDiff line change
@@ -856,6 +856,8 @@ impl<'mir, 'tcx> ConstPropagator<'mir, 'tcx> {
856856
});
857857

858858
if let Some(Some(alloc)) = alloc {
859+
// Assign entire constant in a single statement.
860+
// We can't use aggregates, as we are post-aggregate-lowering.
859861
*rval = Rvalue::Use(Operand::Constant(Box::new(Constant {
860862
span: source_info.span,
861863
user_ty: None,

0 commit comments

Comments
 (0)