diff options
| author | LingMan <LingMan@users.noreply.github.com> | 2021-01-11 22:22:04 +0100 |
|---|---|---|
| committer | LingMan <LingMan@users.noreply.github.com> | 2021-01-12 01:49:36 +0100 |
| commit | 6bd661ef1763fc41cba6ae4971ea877dd47b082b (patch) | |
| tree | 7ef500796a5d286238b6b6fc525472103280b9bd /compiler/rustc_resolve | |
| parent | c5eae562935922f712edec56a45591bc2f8ded1c (diff) | |
| download | rust-6bd661ef1763fc41cba6ae4971ea877dd47b082b.tar.gz rust-6bd661ef1763fc41cba6ae4971ea877dd47b082b.zip | |
Replace a simple `if let` with the `matches` macro
Diffstat (limited to 'compiler/rustc_resolve')
| -rw-r--r-- | compiler/rustc_resolve/src/late.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/rustc_resolve/src/late.rs b/compiler/rustc_resolve/src/late.rs index 8544e1d8ee5..6219d1b08eb 100644 --- a/compiler/rustc_resolve/src/late.rs +++ b/compiler/rustc_resolve/src/late.rs @@ -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); } |
