@@ -140,13 +140,13 @@ impl<'tcx> RegionInferenceContext<'tcx> {
140
140
& self ,
141
141
index : ConstraintIndex ,
142
142
mir : & Mir < ' tcx > ,
143
- ) -> Option < ( ConstraintCategory , Span ) > {
143
+ ) -> ( ConstraintCategory , Span ) {
144
144
let constraint = self . constraints [ index] ;
145
145
let span = constraint. locations . span ( mir) ;
146
- let location = constraint. locations . from_location ( ) ? ;
146
+ let location = constraint. locations . from_location ( ) . unwrap_or ( Location :: START ) ;
147
147
148
148
if !self . constraint_is_interesting ( index) {
149
- return Some ( ( ConstraintCategory :: Boring , span) ) ;
149
+ return ( ConstraintCategory :: Boring , span) ;
150
150
}
151
151
152
152
let data = & mir[ location. block ] ;
@@ -178,7 +178,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
178
178
}
179
179
} ;
180
180
181
- Some ( ( category, span) )
181
+ ( category, span)
182
182
}
183
183
184
184
/// Report an error because the universal region `fr` was required to outlive
@@ -231,7 +231,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
231
231
232
232
// Classify each of the constraints along the path.
233
233
let mut categorized_path: Vec < ( ConstraintCategory , Span ) > = path. iter ( )
234
- . filter_map ( |& index| self . classify_constraint ( index, mir) )
234
+ . map ( |& index| self . classify_constraint ( index, mir) )
235
235
. collect ( ) ;
236
236
debug ! ( "report_error: categorized_path={:?}" , categorized_path) ;
237
237
0 commit comments