diff options
Diffstat (limited to 'crates/ra_hir/src/from_source.rs')
-rw-r--r-- | crates/ra_hir/src/from_source.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_hir/src/from_source.rs b/crates/ra_hir/src/from_source.rs index 4b561c63d..9793af858 100644 --- a/crates/ra_hir/src/from_source.rs +++ b/crates/ra_hir/src/from_source.rs | |||
@@ -10,7 +10,7 @@ use ra_syntax::{ | |||
10 | use crate::{ | 10 | use crate::{ |
11 | db::{AstDatabase, DefDatabase, HirDatabase}, | 11 | db::{AstDatabase, DefDatabase, HirDatabase}, |
12 | ids::{AstItemDef, LocationCtx}, | 12 | ids::{AstItemDef, LocationCtx}, |
13 | AstId, Const, Crate, DefWithBody, Enum, EnumVariant, FieldSource, Function, HasSource, | 13 | AstId, Const, Crate, DefWithBody, Enum, EnumVariant, FieldSource, Function, HasBody, HasSource, |
14 | ImplBlock, Local, Module, ModuleSource, Source, Static, Struct, StructField, Trait, TypeAlias, | 14 | ImplBlock, Local, Module, ModuleSource, Source, Static, Struct, StructField, Trait, TypeAlias, |
15 | Union, VariantDef, | 15 | Union, VariantDef, |
16 | }; | 16 | }; |
@@ -144,7 +144,7 @@ impl Local { | |||
144 | }; | 144 | }; |
145 | Some(res) | 145 | Some(res) |
146 | })?; | 146 | })?; |
147 | let (_body, source_map) = db.body_with_source_map(parent); | 147 | let source_map = parent.body_source_map(db); |
148 | let src = src.map(ast::Pat::from); | 148 | let src = src.map(ast::Pat::from); |
149 | let pat_id = source_map.node_pat(src.as_ref())?; | 149 | let pat_id = source_map.node_pat(src.as_ref())?; |
150 | Some(Local { parent, pat_id }) | 150 | Some(Local { parent, pat_id }) |