diff options
| author | Oliver S̶c̶h̶n̶e̶i̶d̶e̶r Scherer <github35764891676564198441@oli-obk.de> | 2018-11-21 12:26:40 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-11-21 12:26:40 +0100 |
| commit | 83388e84c25f86563d82514d7bf71cfd474e008a (patch) | |
| tree | 99f4447d9627cac2ec4485abdb96e12b60c3f285 /src | |
| parent | 780658a464603fa755d94b27f72a375bd81d07ea (diff) | |
| download | rust-83388e84c25f86563d82514d7bf71cfd474e008a.tar.gz rust-83388e84c25f86563d82514d7bf71cfd474e008a.zip | |
Update an outdated comment in mir building
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustc_mir/build/expr/as_temp.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/librustc_mir/build/expr/as_temp.rs b/src/librustc_mir/build/expr/as_temp.rs index 8f50a1e9a21..19bfb35ed62 100644 --- a/src/librustc_mir/build/expr/as_temp.rs +++ b/src/librustc_mir/build/expr/as_temp.rs @@ -85,9 +85,8 @@ impl<'a, 'gcx, 'tcx> Builder<'a, 'gcx, 'tcx> { unpack!(block = this.into(&Place::Local(temp), block, expr)); - // In constants, temp_lifetime is None. We should not need to drop - // anything because no values with a destructor can be created in - // a constant at this time, even if the type may need dropping. + // In constants, temp_lifetime is None. We do not drop anything because + // values with a destructor will simply be leaked in constants. if let Some(temp_lifetime) = temp_lifetime { this.schedule_drop_storage_and_value( expr_span, |
