File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
compiler/rustc_mir_dataflow/src/framework Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -201,11 +201,12 @@ where
201
201
analysis : A ,
202
202
apply_trans_for_block : Option < Box < dyn Fn ( BasicBlock , & mut A :: Domain ) > > ,
203
203
) -> Self {
204
- let bottom_value = analysis . bottom_value ( body ) ;
205
- let mut entry_sets = IndexVec :: from_elem ( bottom_value . clone ( ) , & body. basic_blocks ) ;
204
+ let mut entry_sets =
205
+ IndexVec :: from_fn_n ( |_| analysis . bottom_value ( body ) , body. basic_blocks . len ( ) ) ;
206
206
analysis. initialize_start_block ( body, & mut entry_sets[ mir:: START_BLOCK ] ) ;
207
207
208
- if A :: Direction :: IS_BACKWARD && entry_sets[ mir:: START_BLOCK ] != bottom_value {
208
+ if A :: Direction :: IS_BACKWARD && entry_sets[ mir:: START_BLOCK ] != analysis. bottom_value ( body)
209
+ {
209
210
bug ! ( "`initialize_start_block` is not yet supported for backward dataflow analyses" ) ;
210
211
}
211
212
You can’t perform that action at this time.
0 commit comments