1
Fork 0

Rollup merge of #94011 - est31:let_else, r=lcnr

Even more let_else adoptions

Continuation of #89933, #91018, #91481, #93046, #93590.
This commit is contained in:
Matthias Krüger 2022-02-17 23:00:59 +01:00 committed by GitHub
commit 637d8b89e8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
26 changed files with 50 additions and 104 deletions

View file

@ -704,7 +704,7 @@ impl<'a: 'ast, 'ast> LateResolutionVisitor<'a, '_, 'ast> {
) = &bounded_ty.kind
{
// use this to verify that ident is a type param.
let partial_res = if let Ok(Some(partial_res)) = self.resolve_qpath_anywhere(
let Ok(Some(partial_res)) = self.resolve_qpath_anywhere(
bounded_ty.id,
None,
&Segment::from_path(path),
@ -712,9 +712,7 @@ impl<'a: 'ast, 'ast> LateResolutionVisitor<'a, '_, 'ast> {
span,
true,
CrateLint::No,
) {
partial_res
} else {
) else {
return false;
};
if !(matches!(
@ -731,7 +729,7 @@ impl<'a: 'ast, 'ast> LateResolutionVisitor<'a, '_, 'ast> {
if let ast::TyKind::Path(None, type_param_path) = &ty.peel_refs().kind {
// Confirm that the `SelfTy` is a type parameter.
let partial_res = if let Ok(Some(partial_res)) = self.resolve_qpath_anywhere(
let Ok(Some(partial_res)) = self.resolve_qpath_anywhere(
bounded_ty.id,
None,
&Segment::from_path(type_param_path),
@ -739,9 +737,7 @@ impl<'a: 'ast, 'ast> LateResolutionVisitor<'a, '_, 'ast> {
span,
true,
CrateLint::No,
) {
partial_res
} else {
) else {
return false;
};
if !(matches!(