about summary refs log tree commit diff
path: root/compiler/rustc_middle
diff options
context:
space:
mode:
authorTomasz Miąsko <tomasz.miasko@gmail.com>2020-11-15 00:00:00 +0000
committerTomasz Miąsko <tomasz.miasko@gmail.com>2020-11-15 00:00:00 +0000
commitf27d56d1ff2fdbb86cb1fc86fb06bf32f009ada0 (patch)
tree30cd6a34abaae0085f34220f89a31ef977439368 /compiler/rustc_middle
parent75042566d1c90d912f22e4db43b6d3af98447986 (diff)
downloadrust-f27d56d1ff2fdbb86cb1fc86fb06bf32f009ada0.tar.gz
rust-f27d56d1ff2fdbb86cb1fc86fb06bf32f009ada0.zip
Limit storage duration of inlined always live locals
Diffstat (limited to 'compiler/rustc_middle')
-rw-r--r--compiler/rustc_middle/src/mir/mod.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/rustc_middle/src/mir/mod.rs b/compiler/rustc_middle/src/mir/mod.rs
index 5fe7b0f647d..454cdad2e6a 100644
--- a/compiler/rustc_middle/src/mir/mod.rs
+++ b/compiler/rustc_middle/src/mir/mod.rs
@@ -420,7 +420,9 @@ impl<'tcx> Body<'tcx> {
     /// Returns an iterator over all user-defined variables and compiler-generated temporaries (all
     /// locals that are neither arguments nor the return place).
     #[inline]
-    pub fn vars_and_temps_iter(&self) -> impl Iterator<Item = Local> + ExactSizeIterator {
+    pub fn vars_and_temps_iter(
+        &self,
+    ) -> impl DoubleEndedIterator<Item = Local> + ExactSizeIterator {
         let arg_count = self.arg_count;
         let local_count = self.local_decls.len();
         (arg_count + 1..local_count).map(Local::new)