File tree Expand file tree Collapse file tree 2 files changed +8
-9
lines changed Expand file tree Collapse file tree 2 files changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -1028,15 +1028,13 @@ impl HandlerInner {
10281028 let mut error_codes = self
10291029 . emitted_diagnostic_codes
10301030 . iter ( )
1031- . filter_map ( |x| {
1032- match & x {
1031+ . filter_map ( |x| match & x {
10331032 DiagnosticId :: Error ( s)
1034- if let Ok ( Some ( _explanation ) ) = registry . try_find_description ( s ) =>
1033+ if registry . try_find_description ( s ) . map_or ( false , |o| o . is_some ( ) ) =>
10351034 {
10361035 Some ( s. clone ( ) )
10371036 }
10381037 _ => None ,
1039- }
10401038 } )
10411039 . collect :: < Vec < _ > > ( ) ;
10421040 if !error_codes. is_empty ( ) {
Original file line number Diff line number Diff line change @@ -2417,13 +2417,14 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
24172417 let substs = InternalSubsts :: for_item ( tcx, def_id, |param, _| {
24182418 if let Some ( i) = ( param. index as usize ) . checked_sub ( generics. parent_count ) {
24192419 // Our own parameters are the resolved lifetimes.
2420- match param. kind {
2421- GenericParamDefKind :: Lifetime
2422- if let hir:: GenericArg :: Lifetime ( lifetime) = & lifetimes[ i] =>
2423- {
2420+ if let GenericParamDefKind :: Lifetime = param. kind {
2421+ if let hir:: GenericArg :: Lifetime ( lifetime) = & lifetimes[ i] {
24242422 self . ast_region_to_region ( lifetime, None ) . into ( )
2423+ } else {
2424+ bug ! ( )
24252425 }
2426- _ => bug ! ( ) ,
2426+ } else {
2427+ bug ! ( )
24272428 }
24282429 } else {
24292430 match param. kind {
You can’t perform that action at this time.
0 commit comments