use idiomatic formatting

Also, remove needless else
This commit is contained in:
Tshepang Mbambo 2023-02-09 10:57:52 +02:00
parent e7acd078f4
commit b651679d90

View File

@ -803,7 +803,8 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
while let Some(arg) = walk.next() {
if arg == param_to_point_at {
return true;
} else if let ty::GenericArgKind::Type(ty) = arg.unpack()
}
if let ty::GenericArgKind::Type(ty) = arg.unpack()
&& let ty::Alias(ty::Projection, ..) = ty.kind()
{
// This logic may seem a bit strange, but typically when