Rebased and improved errors
This commit is contained in:
parent
b5235ea732
commit
6d6314f878
9 changed files with 40 additions and 20 deletions
|
@ -125,7 +125,7 @@ impl<'tcx> NonConstOp<'tcx> for FnCallNonConst<'tcx> {
|
|||
param_env,
|
||||
Binder::dummy(TraitPredicate {
|
||||
trait_ref,
|
||||
constness: BoundConstness::ConstIfConst,
|
||||
constness: BoundConstness::NotConst,
|
||||
polarity: ImplPolarity::Positive,
|
||||
}),
|
||||
);
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue