Rollup merge of - LingMan:matches, r=estebank

Replace a simple `if let` with the `matches` macro

`@rustbot` modify labels +C-cleanup +T-compiler
This commit is contained in:
Yuki Okushi 2021-01-12 16:13:33 +09:00 committed by GitHub
commit 8c342da22e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1947,8 +1947,7 @@ impl<'a: 'ast, 'b, 'ast> LateResolutionVisitor<'a, 'b, 'ast> {
_ => report_errors(self, None),
};
if let PathSource::TraitItem(..) = source {
} else {
if !matches!(source, PathSource::TraitItem(..)) {
// Avoid recording definition of `A::B` in `<T as A>::B::C`.
self.r.record_partial_res(id, partial_res);
}