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
201201 analysis : A ,
202202 apply_trans_for_block : Option < Box < dyn Fn ( BasicBlock , & mut A :: Domain ) > > ,
203203 ) -> 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 ( ) ) ;
206206 analysis. initialize_start_block ( body, & mut entry_sets[ mir:: START_BLOCK ] ) ;
207207
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+ {
209210 bug ! ( "`initialize_start_block` is not yet supported for backward dataflow analyses" ) ;
210211 }
211212
You can’t perform that action at this time.
0 commit comments