File tree 1 file changed +2
-5
lines changed
compiler/rustc_middle/src/mir
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> {
412
412
/// Returns an iterator over all function arguments.
413
413
#[ inline]
414
414
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)
417
416
}
418
417
419
418
/// Returns an iterator over all user-defined variables and compiler-generated temporaries (all
@@ -422,9 +421,7 @@ impl<'tcx> Body<'tcx> {
422
421
pub fn vars_and_temps_iter (
423
422
& self ,
424
423
) -> 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)
428
425
}
429
426
430
427
/// 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