1
Fork 0

Auto merge of #102931 - camsteffen:inline-overlapping-impls, r=cjgillot

Make `overlapping_impls` not generic

Trying to win back perf from #101632.
This commit is contained in:
bors 2022-10-16 02:05:30 +00:00
commit 75dbd5b8c3
3 changed files with 34 additions and 47 deletions

View file

@ -148,12 +148,11 @@ impl<'tcx> InherentOverlapChecker<'tcx> {
// inherent impls without warning.
SkipLeakCheck::Yes,
overlap_mode,
|overlap| {
self.check_for_common_items_in_impls(impl1_def_id, impl2_def_id, overlap);
false
},
|| true,
);
)
.map_or(true, |overlap| {
self.check_for_common_items_in_impls(impl1_def_id, impl2_def_id, overlap);
false
});
}
fn check_item(&mut self, id: hir::ItemId) {