@@ -879,7 +879,7 @@ impl<'a> Liveness<'a> {
879
879
fn propagate_through_block ( & mut self , blk : & Block , succ : LiveNode )
880
880
-> LiveNode {
881
881
let succ = self . propagate_through_opt_expr ( blk. expr , succ) ;
882
- blk. stmts . rev_iter ( ) . fold ( succ, |succ, stmt| {
882
+ blk. stmts . iter ( ) . rev ( ) . fold ( succ, |succ, stmt| {
883
883
self . propagate_through_stmt ( * stmt, succ)
884
884
} )
885
885
}
@@ -980,7 +980,7 @@ impl<'a> Liveness<'a> {
980
980
this. ir . tcx . sess . span_bug ( expr. span , "no registered caps" ) ;
981
981
}
982
982
} ;
983
- caps. deref ( ) . rev_iter ( ) . fold ( succ, |succ, cap| {
983
+ caps. deref ( ) . iter ( ) . rev ( ) . fold ( succ, |succ, cap| {
984
984
this. init_from_succ ( cap. ln , succ) ;
985
985
let var = this. variable ( cap. var_nid , expr. span ) ;
986
986
this. acc ( cap. ln , var, ACC_READ | ACC_USE ) ;
@@ -1121,7 +1121,7 @@ impl<'a> Liveness<'a> {
1121
1121
1122
1122
ExprStruct ( _, ref fields, with_expr) => {
1123
1123
let succ = self . propagate_through_opt_expr ( with_expr, succ) ;
1124
- fields. rev_iter ( ) . fold ( succ, |succ, field| {
1124
+ fields. iter ( ) . rev ( ) . fold ( succ, |succ, field| {
1125
1125
self . propagate_through_expr ( field. expr , succ)
1126
1126
} )
1127
1127
}
@@ -1173,14 +1173,14 @@ impl<'a> Liveness<'a> {
1173
1173
}
1174
1174
1175
1175
ExprInlineAsm ( ref ia) => {
1176
- let succ = ia. outputs . rev_iter ( ) . fold ( succ, |succ, & ( _, expr) | {
1176
+ let succ = ia. outputs . iter ( ) . rev ( ) . fold ( succ, |succ, & ( _, expr) | {
1177
1177
// see comment on lvalues in
1178
1178
// propagate_through_lvalue_components()
1179
1179
let succ = self . write_lvalue ( expr, succ, ACC_WRITE ) ;
1180
1180
self . propagate_through_lvalue_components ( expr, succ)
1181
1181
} ) ;
1182
1182
// Inputs are executed first. Propagate last because of rev order
1183
- ia. inputs . rev_iter ( ) . fold ( succ, |succ, & ( _, expr) | {
1183
+ ia. inputs . iter ( ) . rev ( ) . fold ( succ, |succ, & ( _, expr) | {
1184
1184
self . propagate_through_expr ( expr, succ)
1185
1185
} )
1186
1186
}
0 commit comments