@@ -140,13 +140,13 @@ impl<'tcx> RegionInferenceContext<'tcx> {
140140 & self ,
141141 index : ConstraintIndex ,
142142 mir : & Mir < ' tcx > ,
143- ) -> Option < ( ConstraintCategory , Span ) > {
143+ ) -> ( ConstraintCategory , Span ) {
144144 let constraint = self . constraints [ index] ;
145145 let span = constraint. locations . span ( mir) ;
146- let location = constraint. locations . from_location ( ) ? ;
146+ let location = constraint. locations . from_location ( ) . unwrap_or ( Location :: START ) ;
147147
148148 if !self . constraint_is_interesting ( index) {
149- return Some ( ( ConstraintCategory :: Boring , span) ) ;
149+ return ( ConstraintCategory :: Boring , span) ;
150150 }
151151
152152 let data = & mir[ location. block ] ;
@@ -178,7 +178,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
178178 }
179179 } ;
180180
181- Some ( ( category, span) )
181+ ( category, span)
182182 }
183183
184184 /// Report an error because the universal region `fr` was required to outlive
@@ -231,7 +231,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
231231
232232 // Classify each of the constraints along the path.
233233 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) )
235235 . collect ( ) ;
236236 debug ! ( "report_error: categorized_path={:?}" , categorized_path) ;
237237
0 commit comments