Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/infer/expr.rs')
| -rw-r--r-- | crates/hir-ty/src/infer/expr.rs | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/crates/hir-ty/src/infer/expr.rs b/crates/hir-ty/src/infer/expr.rs index 0a1bfb41d8..8df6d9bee4 100644 --- a/crates/hir-ty/src/infer/expr.rs +++ b/crates/hir-ty/src/infer/expr.rs @@ -730,13 +730,10 @@ impl<'db> InferenceContext<'_, 'db> { trait_element_ty } None => { - if self.lang_items.Index.is_some() && self.lang_items.Index_index.is_some() - { - self.push_diagnostic(InferenceDiagnostic::CannotIndexInto { - expr: tgt_expr, - found: base_t.store(), - }); - } + self.push_diagnostic(InferenceDiagnostic::CannotIndexInto { + expr: tgt_expr, + found: base_t.store(), + }); self.types.types.error } } |