Skip to content

Commit

Permalink
Replace a simple if let with the matches macro
Browse files Browse the repository at this point in the history
  • Loading branch information
LingMan committed Jan 12, 2021
1 parent c5eae56 commit 6bd661e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions compiler/rustc_resolve/src/late.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 6bd661e

Please sign in to comment.