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_def/src/body.rs | |
parent | 379787858bbfb2691e134942d94fcbc70c5d1d7f (diff) | |
parent | 84e3304a9bf0d68e30d58b1e37a6db2e9ec97525 (diff) |
Merge branch 'master' of github.com:rust-analyzer/rust-analyzer
Diffstat (limited to 'crates/ra_hir_def/src/body.rs')
-rw-r--r-- | crates/ra_hir_def/src/body.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_hir_def/src/body.rs b/crates/ra_hir_def/src/body.rs index eafaf48c1..3b169440a 100644 --- a/crates/ra_hir_def/src/body.rs +++ b/crates/ra_hir_def/src/body.rs | |||
@@ -210,7 +210,7 @@ pub struct BodySourceMap { | |||
210 | expr_map_back: ArenaMap<ExprId, Result<ExprSource, SyntheticSyntax>>, | 210 | expr_map_back: ArenaMap<ExprId, Result<ExprSource, SyntheticSyntax>>, |
211 | pat_map: FxHashMap<PatSource, PatId>, | 211 | pat_map: FxHashMap<PatSource, PatId>, |
212 | pat_map_back: ArenaMap<PatId, Result<PatSource, SyntheticSyntax>>, | 212 | pat_map_back: ArenaMap<PatId, Result<PatSource, SyntheticSyntax>>, |
213 | field_map: FxHashMap<(ExprId, usize), AstPtr<ast::RecordField>>, | 213 | field_map: FxHashMap<(ExprId, usize), InFile<AstPtr<ast::RecordField>>>, |
214 | expansions: FxHashMap<InFile<AstPtr<ast::MacroCall>>, HirFileId>, | 214 | expansions: FxHashMap<InFile<AstPtr<ast::MacroCall>>, HirFileId>, |
215 | } | 215 | } |
216 | 216 | ||
@@ -303,7 +303,7 @@ impl BodySourceMap { | |||
303 | self.pat_map.get(&src).cloned() | 303 | self.pat_map.get(&src).cloned() |
304 | } | 304 | } |
305 | 305 | ||
306 | pub fn field_syntax(&self, expr: ExprId, field: usize) -> AstPtr<ast::RecordField> { | 306 | pub fn field_syntax(&self, expr: ExprId, field: usize) -> InFile<AstPtr<ast::RecordField>> { |
307 | self.field_map[&(expr, field)].clone() | 307 | self.field_map[&(expr, field)].clone() |
308 | } | 308 | } |
309 | } | 309 | } |