File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
rustc_data_structures/src/graph/dominators
rustc_mir/src/borrow_check Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -85,6 +85,10 @@ pub struct Dominators<N: Idx> {
8585}
8686
8787impl < Node : Idx > Dominators < Node > {
88+ pub fn dummy ( ) -> Self {
89+ Self { post_order_rank : IndexVec :: new ( ) , immediate_dominators : IndexVec :: new ( ) }
90+ }
91+
8892 pub fn is_reachable ( & self , node : Node ) -> bool {
8993 self . immediate_dominators [ node] . is_some ( )
9094 }
Original file line number Diff line number Diff line change @@ -266,15 +266,14 @@ fn do_mir_borrowck<'a, 'tcx>(
266266
267267 for ( idx, move_data_results) in promoted_errors {
268268 let promoted_body = & promoted[ idx] ;
269- let dominators = promoted_body. dominators ( ) ;
270269
271270 if let Err ( ( move_data, move_errors) ) = move_data_results {
272271 let mut promoted_mbcx = MirBorrowckCtxt {
273272 infcx,
274273 param_env,
275274 body : promoted_body,
276275 move_data : & move_data,
277- location_table : & LocationTable :: new ( promoted_body ) ,
276+ location_table, // no need to create a real one for the promoted, it is not used
278277 movable_generator,
279278 fn_self_span_reported : Default :: default ( ) ,
280279 locals_are_invalidated_at_exit,
@@ -288,7 +287,7 @@ fn do_mir_borrowck<'a, 'tcx>(
288287 used_mut : Default :: default ( ) ,
289288 used_mut_upvars : SmallVec :: new ( ) ,
290289 borrow_set : Rc :: clone ( & borrow_set) ,
291- dominators,
290+ dominators : Dominators :: dummy ( ) , // not used
292291 upvars : Vec :: new ( ) ,
293292 local_names : IndexVec :: from_elem ( None , & promoted_body. local_decls ) ,
294293 region_names : RefCell :: default ( ) ,
You can’t perform that action at this time.
0 commit comments