use idiomatic formatting
Also, remove needless else
This commit is contained in:
parent
e7acd078f4
commit
b651679d90
@ -802,18 +802,19 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
|
|||||||
let mut walk = ty.walk();
|
let mut walk = ty.walk();
|
||||||
while let Some(arg) = walk.next() {
|
while let Some(arg) = walk.next() {
|
||||||
if arg == param_to_point_at {
|
if arg == param_to_point_at {
|
||||||
return true;
|
return true;
|
||||||
} else if let ty::GenericArgKind::Type(ty) = arg.unpack()
|
}
|
||||||
&& let ty::Alias(ty::Projection, ..) = ty.kind()
|
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
|
{
|
||||||
// we have a projection type in a function signature, the
|
// This logic may seem a bit strange, but typically when
|
||||||
// argument that's being passed into that signature is
|
// we have a projection type in a function signature, the
|
||||||
// not actually constraining that projection's substs in
|
// argument that's being passed into that signature is
|
||||||
// a meaningful way. So we skip it, and see improvements
|
// not actually constraining that projection's substs in
|
||||||
// in some UI tests.
|
// a meaningful way. So we skip it, and see improvements
|
||||||
walk.skip_current_subtree();
|
// in some UI tests.
|
||||||
}
|
walk.skip_current_subtree();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user