Skip to content

Commit 8c342da

Browse files
authored
Rollup merge of #80927 - LingMan:matches, r=estebank
Replace a simple `if let` with the `matches` macro `@rustbot` modify labels +C-cleanup +T-compiler
2 parents 961a438 + 6bd661e commit 8c342da

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

compiler/rustc_resolve/src/late.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1947,8 +1947,7 @@ impl<'a: 'ast, 'b, 'ast> LateResolutionVisitor<'a, 'b, 'ast> {
19471947
_ => report_errors(self, None),
19481948
};
19491949

1950-
if let PathSource::TraitItem(..) = source {
1951-
} else {
1950+
if !matches!(source, PathSource::TraitItem(..)) {
19521951
// Avoid recording definition of `A::B` in `<T as A>::B::C`.
19531952
self.r.record_partial_res(id, partial_res);
19541953
}

0 commit comments

Comments
 (0)