diff options
author | Benjamin Coenen <[email protected]> | 2020-04-18 16:14:24 +0100 |
---|---|---|
committer | Benjamin Coenen <[email protected]> | 2020-04-18 16:14:24 +0100 |
commit | af3c19e85f55db9277ce9ad5b784df2ccfe3c9e4 (patch) | |
tree | 7a777f22f5fa79704b8d2c9aa8d67255d12123be /crates/ra_hir_ty/src/infer.rs | |
parent | 379787858bbfb2691e134942d94fcbc70c5d1d7f (diff) | |
parent | 84e3304a9bf0d68e30d58b1e37a6db2e9ec97525 (diff) |
Merge branch 'master' of github.com:rust-analyzer/rust-analyzer
Diffstat (limited to 'crates/ra_hir_ty/src/infer.rs')
-rw-r--r-- | crates/ra_hir_ty/src/infer.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_hir_ty/src/infer.rs b/crates/ra_hir_ty/src/infer.rs index 246b0e9be..b6d9b3438 100644 --- a/crates/ra_hir_ty/src/infer.rs +++ b/crates/ra_hir_ty/src/infer.rs | |||
@@ -682,10 +682,10 @@ mod diagnostics { | |||
682 | ) { | 682 | ) { |
683 | match self { | 683 | match self { |
684 | InferenceDiagnostic::NoSuchField { expr, field } => { | 684 | InferenceDiagnostic::NoSuchField { expr, field } => { |
685 | let file = owner.lookup(db.upcast()).source(db.upcast()).file_id; | 685 | let source = owner.lookup(db.upcast()).source(db.upcast()); |
686 | let (_, source_map) = db.body_with_source_map(owner.into()); | 686 | let (_, source_map) = db.body_with_source_map(owner.into()); |
687 | let field = source_map.field_syntax(*expr, *field); | 687 | let field = source_map.field_syntax(*expr, *field); |
688 | sink.push(NoSuchField { file, field }) | 688 | sink.push(NoSuchField { file: source.file_id, field: field.value }) |
689 | } | 689 | } |
690 | } | 690 | } |
691 | } | 691 | } |