fix a panic with glob-import missing a source map

This commit is contained in:
Aleksey Kladov
2019-04-02 13:26:09 +03:00
parent ab19ff16e5
commit 49f13d3a9b
5 changed files with 26 additions and 23 deletions

View File

@@ -72,7 +72,7 @@ impl Module {
&self,
db: &impl HirDatabase,
import: ImportId,
) -> TreeArc<ast::PathSegment> {
) -> TreeArc<ast::UseTree> {
let (file_id, source) = self.definition_source(db);
let (_, source_map) = db.raw_items_with_source_map(file_id);
source_map.get(&source, import)