about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorOliver S̶c̶h̶n̶e̶i̶d̶e̶r Scherer <github35764891676564198441@oli-obk.de>2018-11-21 12:26:40 +0100
committerGitHub <noreply@github.com>2018-11-21 12:26:40 +0100
commit83388e84c25f86563d82514d7bf71cfd474e008a (patch)
tree99f4447d9627cac2ec4485abdb96e12b60c3f285 /src
parent780658a464603fa755d94b27f72a375bd81d07ea (diff)
downloadrust-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.rs5
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,