Rebased and improved errors

This commit is contained in:
Deadbeef
2021-12-29 16:29:14 +08:00
parent b5235ea732
commit 6d6314f878
9 changed files with 40 additions and 20 deletions

View File

@@ -71,9 +71,7 @@ pub fn call_kind<'tcx>(
AssocItemContainer::TraitContainer(trait_did) => Some(trait_did),
});
let fn_call = (!from_hir_call)
.then(|| parent)
.flatten()
let fn_call = parent
.and_then(|p| tcx.lang_items().group(LangItemGroup::Fn).iter().find(|did| **did == p));
let operator = (!from_hir_call)