Replace a simple if let with the matches macro

This commit is contained in:
LingMan 2021-01-11 22:22:04 +01:00
parent c5eae56293
commit 6bd661ef17

View file

@ -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);
}