File tree Expand file tree Collapse file tree 1 file changed +6
-11
lines changed
compiler/rustc_hir_typeck/src Expand file tree Collapse file tree 1 file changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -439,17 +439,12 @@ impl<'tcx> FnCtxt<'_, 'tcx> {
439
439
//
440
440
// In practice currently the two ways that this happens is
441
441
// coercion and subtyping.
442
- let ( a, b) = if let ty:: PredicateKind :: Coerce ( ty:: CoercePredicate { a, b } ) = atom {
443
- ( a, b)
444
- } else if let ty:: PredicateKind :: Subtype ( ty:: SubtypePredicate {
445
- a_is_expected : _,
446
- a,
447
- b,
448
- } ) = atom
449
- {
450
- ( a, b)
451
- } else {
452
- return None ;
442
+ let ( a, b) = match atom {
443
+ ty:: PredicateKind :: Coerce ( ty:: CoercePredicate { a, b } ) => ( a, b) ,
444
+ ty:: PredicateKind :: Subtype ( ty:: SubtypePredicate { a_is_expected : _, a, b } ) => {
445
+ ( a, b)
446
+ }
447
+ _ => return None ,
453
448
} ;
454
449
455
450
let a_vid = self . root_vid ( a) ?;
You can’t perform that action at this time.
0 commit comments