File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
compiler/rustc_middle/src/mir Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -412,8 +412,7 @@ impl<'tcx> Body<'tcx> {
412412 /// Returns an iterator over all function arguments.
413413 #[ inline]
414414 pub fn args_iter ( & self ) -> impl Iterator < Item = Local > + ExactSizeIterator {
415- let arg_count = self . arg_count ;
416- ( 1 ..arg_count + 1 ) . map ( Local :: new)
415+ ( 1 ..self . arg_count + 1 ) . map ( Local :: new)
417416 }
418417
419418 /// Returns an iterator over all user-defined variables and compiler-generated temporaries (all
@@ -422,9 +421,7 @@ impl<'tcx> Body<'tcx> {
422421 pub fn vars_and_temps_iter (
423422 & self ,
424423 ) -> impl DoubleEndedIterator < Item = Local > + ExactSizeIterator {
425- let arg_count = self . arg_count ;
426- let local_count = self . local_decls . len ( ) ;
427- ( arg_count + 1 ..local_count) . map ( Local :: new)
424+ ( self . arg_count + 1 ..self . local_decls . len ( ) ) . map ( Local :: new)
428425 }
429426
430427 /// Changes a statement to a nop. This is both faster than deleting instructions and avoids
You can’t perform that action at this time.
0 commit comments