Skip to content

Commit f2a2e29

Browse files
authored
Rollup merge of #107835 - tshepang:fmt, r=WaffleLapkin
use idiomatic formatting Also, remove needless `else`
2 parents a8df4b1 + b651679 commit f2a2e29

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

compiler/rustc_hir_typeck/src/fn_ctxt/adjust_fulfillment_errors.rs

+13-12
Original file line numberDiff line numberDiff line change
@@ -802,18 +802,19 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
802802
let mut walk = ty.walk();
803803
while let Some(arg) = walk.next() {
804804
if arg == param_to_point_at {
805-
return true;
806-
} else if let ty::GenericArgKind::Type(ty) = arg.unpack()
807-
&& let ty::Alias(ty::Projection, ..) = ty.kind()
808-
{
809-
// This logic may seem a bit strange, but typically when
810-
// we have a projection type in a function signature, the
811-
// argument that's being passed into that signature is
812-
// not actually constraining that projection's substs in
813-
// a meaningful way. So we skip it, and see improvements
814-
// in some UI tests.
815-
walk.skip_current_subtree();
816-
}
805+
return true;
806+
}
807+
if let ty::GenericArgKind::Type(ty) = arg.unpack()
808+
&& let ty::Alias(ty::Projection, ..) = ty.kind()
809+
{
810+
// This logic may seem a bit strange, but typically when
811+
// we have a projection type in a function signature, the
812+
// argument that's being passed into that signature is
813+
// not actually constraining that projection's substs in
814+
// a meaningful way. So we skip it, and see improvements
815+
// in some UI tests.
816+
walk.skip_current_subtree();
817+
}
817818
}
818819
false
819820
}

0 commit comments

Comments
 (0)