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 c4f112a commit 0f705bdCopy full SHA for 0f705bd
compiler/rustc_hir_typeck/src/fallback.rs
@@ -436,17 +436,12 @@ impl<'tcx> FnCtxt<'_, 'tcx> {
436
//
437
// In practice currently the two ways that this happens is
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
448
- } else {
449
- 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,
450
};
451
452
let a_vid = self.root_vid(a)?;
0 commit comments