This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree 2 files changed +8
-9
lines changed 2 files changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -1028,15 +1028,13 @@ impl HandlerInner {
1028
1028
let mut error_codes = self
1029
1029
. emitted_diagnostic_codes
1030
1030
. iter ( )
1031
- . filter_map ( |x| {
1032
- match & x {
1031
+ . filter_map ( |x| match & x {
1033
1032
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 ( ) ) =>
1035
1034
{
1036
1035
Some ( s. clone ( ) )
1037
1036
}
1038
1037
_ => None ,
1039
- }
1040
1038
} )
1041
1039
. collect :: < Vec < _ > > ( ) ;
1042
1040
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 {
2417
2417
let substs = InternalSubsts :: for_item ( tcx, def_id, |param, _| {
2418
2418
if let Some ( i) = ( param. index as usize ) . checked_sub ( generics. parent_count ) {
2419
2419
// 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] {
2424
2422
self . ast_region_to_region ( lifetime, None ) . into ( )
2423
+ } else {
2424
+ bug ! ( )
2425
2425
}
2426
- _ => bug ! ( ) ,
2426
+ } else {
2427
+ bug ! ( )
2427
2428
}
2428
2429
} else {
2429
2430
match param. kind {
You can’t perform that action at this time.
0 commit comments