diff options
| author | Deadbeef <ent3rm4n@gmail.com> | 2021-12-29 16:29:14 +0800 |
|---|---|---|
| committer | Deadbeef <ent3rm4n@gmail.com> | 2022-02-12 19:24:42 +1100 |
| commit | 6d6314f878bf489e15293498ecb4af082c8d53d8 (patch) | |
| tree | 467761999ce43c50864f82b19f5b862241cac5b0 /compiler/rustc_const_eval/src/util | |
| parent | b5235ea732dcb517338eaf2e35fda8ddcf515771 (diff) | |
| download | rust-6d6314f878bf489e15293498ecb4af082c8d53d8.tar.gz rust-6d6314f878bf489e15293498ecb4af082c8d53d8.zip | |
Rebased and improved errors
Diffstat (limited to 'compiler/rustc_const_eval/src/util')
| -rw-r--r-- | compiler/rustc_const_eval/src/util/call_kind.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/compiler/rustc_const_eval/src/util/call_kind.rs b/compiler/rustc_const_eval/src/util/call_kind.rs index 34925692664..fe35d942341 100644 --- a/compiler/rustc_const_eval/src/util/call_kind.rs +++ b/compiler/rustc_const_eval/src/util/call_kind.rs @@ -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) |
