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 @@ -436,17 +436,12 @@ impl<'tcx> FnCtxt<'_, 'tcx> {
436
436
//
437
437
// In practice currently the two ways that this happens is
438
438
// coercion and subtyping.
439
- let ( a, b) = if let ty:: PredicateKind :: Coerce ( ty:: CoercePredicate { a, b } ) = atom {
440
- ( a, b)
441
- } else if let ty:: PredicateKind :: Subtype ( ty:: SubtypePredicate {
442
- a_is_expected : _,
443
- a,
444
- b,
445
- } ) = atom
446
- {
447
- ( a, b)
448
- } else {
449
- return None ;
439
+ let ( a, b) = match atom {
440
+ ty:: PredicateKind :: Coerce ( ty:: CoercePredicate { a, b } ) => ( a, b) ,
441
+ ty:: PredicateKind :: Subtype ( ty:: SubtypePredicate { a_is_expected : _, a, b } ) => {
442
+ ( a, b)
443
+ }
444
+ _ => return None ,
450
445
} ;
451
446
452
447
let a_vid = self . root_vid ( a) ?;
You can’t perform that action at this time.
0 commit comments