@@ -39,8 +39,8 @@ pub(crate) fn emit_facts<'tcx>(
39
39
location_table : & LocationTable ,
40
40
body : & Body < ' tcx > ,
41
41
borrow_set : & BorrowSet < ' tcx > ,
42
- move_data : & MoveData < ' _ > ,
43
- universal_region_relations : & UniversalRegionRelations < ' _ > ,
42
+ move_data : & MoveData < ' tcx > ,
43
+ universal_region_relations : & UniversalRegionRelations < ' tcx > ,
44
44
) {
45
45
let Some ( all_facts) = all_facts else {
46
46
// We don't do anything if there are no facts to fill.
@@ -202,13 +202,12 @@ pub(crate) fn emit_drop_facts<'tcx>(
202
202
all_facts : & mut Option < AllFacts > ,
203
203
) {
204
204
debug ! ( "emit_drop_facts(local={:?}, kind={:?}" , local, kind) ;
205
- if let Some ( facts) = all_facts. as_mut ( ) {
206
- let _prof_timer = tcx. prof . generic_activity ( "polonius_fact_generation" ) ;
207
- tcx. for_each_free_region ( kind, |drop_live_region| {
208
- let region_vid = universal_regions. to_region_vid ( drop_live_region) ;
209
- facts. drop_of_var_derefs_origin . push ( ( local, region_vid. into ( ) ) ) ;
210
- } ) ;
211
- }
205
+ let Some ( facts) = all_facts. as_mut ( ) else { return } ;
206
+ let _prof_timer = tcx. prof . generic_activity ( "polonius_fact_generation" ) ;
207
+ tcx. for_each_free_region ( kind, |drop_live_region| {
208
+ let region_vid = universal_regions. to_region_vid ( drop_live_region) ;
209
+ facts. drop_of_var_derefs_origin . push ( ( local, region_vid. into ( ) ) ) ;
210
+ } ) ;
212
211
}
213
212
214
213
/// Emit facts about the outlives constraints: the `subset` base relation, i.e. not a transitive
@@ -219,22 +218,23 @@ pub(crate) fn emit_outlives_facts<'tcx>(
219
218
location_table : & LocationTable ,
220
219
all_facts : & mut Option < AllFacts > ,
221
220
) {
222
- if let Some ( facts) = all_facts {
223
- let _prof_timer = tcx. prof . generic_activity ( "polonius_fact_generation" ) ;
224
- facts. subset_base . extend ( constraints. outlives_constraints . outlives ( ) . iter ( ) . flat_map (
225
- |constraint : & OutlivesConstraint < ' _ > | {
226
- if let Some ( from_location) = constraint. locations . from_location ( ) {
227
- Either :: Left ( iter:: once ( (
228
- constraint. sup . into ( ) ,
229
- constraint. sub . into ( ) ,
230
- location_table. mid_index ( from_location) ,
231
- ) ) )
232
- } else {
233
- Either :: Right ( location_table. all_points ( ) . map ( move |location| {
221
+ let Some ( facts) = all_facts else { return } ;
222
+ let _prof_timer = tcx. prof . generic_activity ( "polonius_fact_generation" ) ;
223
+ facts. subset_base . extend ( constraints. outlives_constraints . outlives ( ) . iter ( ) . flat_map (
224
+ |constraint : & OutlivesConstraint < ' _ > | {
225
+ if let Some ( from_location) = constraint. locations . from_location ( ) {
226
+ Either :: Left ( iter:: once ( (
227
+ constraint. sup . into ( ) ,
228
+ constraint. sub . into ( ) ,
229
+ location_table. mid_index ( from_location) ,
230
+ ) ) )
231
+ } else {
232
+ Either :: Right (
233
+ location_table. all_points ( ) . map ( move |location| {
234
234
( constraint. sup . into ( ) , constraint. sub . into ( ) , location)
235
- } ) )
236
- }
237
- } ,
238
- ) ) ;
239
- }
235
+ } ) ,
236
+ )
237
+ }
238
+ } ,
239
+ ) ) ;
240
240
}
0 commit comments