We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
if
match
1 parent fa134b5 commit 7c653c9Copy full SHA for 7c653c9
compiler/rustc_hir_typeck/src/fallback.rs
@@ -439,17 +439,12 @@ impl<'tcx> FnCtxt<'_, 'tcx> {
439
//
440
// In practice currently the two ways that this happens is
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
451
- } else {
452
- return None;
+ let (a, b) = match atom {
+ ty::PredicateKind::Coerce(ty::CoercePredicate { a, b }) => (a, b),
+ ty::PredicateKind::Subtype(ty::SubtypePredicate { a_is_expected: _, a, b }) => {
+ (a, b)
+ }
+ _ => return None,
453
};
454
455
let a_vid = self.root_vid(a)?;
0 commit comments