aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_ty/src/infer.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir_ty/src/infer.rs')
-rw-r--r--crates/ra_hir_ty/src/infer.rs9
1 files changed, 1 insertions, 8 deletions
diff --git a/crates/ra_hir_ty/src/infer.rs b/crates/ra_hir_ty/src/infer.rs
index 7e6cdefe4..b6d9b3438 100644
--- a/crates/ra_hir_ty/src/infer.rs
+++ b/crates/ra_hir_ty/src/infer.rs
@@ -665,7 +665,6 @@ impl Expectation {
665mod diagnostics { 665mod diagnostics {
666 use hir_def::{expr::ExprId, src::HasSource, FunctionId, Lookup}; 666 use hir_def::{expr::ExprId, src::HasSource, FunctionId, Lookup};
667 use hir_expand::diagnostics::DiagnosticSink; 667 use hir_expand::diagnostics::DiagnosticSink;
668 use ra_syntax::AstNode;
669 668
670 use crate::{db::HirDatabase, diagnostics::NoSuchField}; 669 use crate::{db::HirDatabase, diagnostics::NoSuchField};
671 670
@@ -686,13 +685,7 @@ mod diagnostics {
686 let source = owner.lookup(db.upcast()).source(db.upcast()); 685 let source = owner.lookup(db.upcast()).source(db.upcast());
687 let (_, source_map) = db.body_with_source_map(owner.into()); 686 let (_, source_map) = db.body_with_source_map(owner.into());
688 let field = source_map.field_syntax(*expr, *field); 687 let field = source_map.field_syntax(*expr, *field);
689 let root = field.file_syntax(db.upcast()); 688 sink.push(NoSuchField { file: source.file_id, field: field.value })
690 let highlight_range = field.value.to_node(&root).syntax().text_range();
691 sink.push(NoSuchField {
692 file: source.file_id,
693 field: field.value,
694 highlight_range,
695 })
696 } 689 }
697 } 690 }
698 } 691 }