Skip to content

Commit 83388e8

Browse files
authored
Update an outdated comment in mir building
1 parent 780658a commit 83388e8

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/librustc_mir/build/expr/as_temp.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,8 @@ impl<'a, 'gcx, 'tcx> Builder<'a, 'gcx, 'tcx> {
8585

8686
unpack!(block = this.into(&Place::Local(temp), block, expr));
8787

88-
// In constants, temp_lifetime is None. We should not need to drop
89-
// anything because no values with a destructor can be created in
90-
// a constant at this time, even if the type may need dropping.
88+
// In constants, temp_lifetime is None. We do not drop anything because
89+
// values with a destructor will simply be leaked in constants.
9190
if let Some(temp_lifetime) = temp_lifetime {
9291
this.schedule_drop_storage_and_value(
9392
expr_span,

0 commit comments

Comments
 (0)