diff options
Diffstat (limited to 'crates/ra_hir/src/nameres')
-rw-r--r-- | crates/ra_hir/src/nameres/raw.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/crates/ra_hir/src/nameres/raw.rs b/crates/ra_hir/src/nameres/raw.rs index 211e02068..bd32b264b 100644 --- a/crates/ra_hir/src/nameres/raw.rs +++ b/crates/ra_hir/src/nameres/raw.rs | |||
@@ -75,8 +75,11 @@ impl RawItems { | |||
75 | source_ast_id_map: db.ast_id_map(file_id.into()), | 75 | source_ast_id_map: db.ast_id_map(file_id.into()), |
76 | source_map: ImportSourceMap::default(), | 76 | source_map: ImportSourceMap::default(), |
77 | }; | 77 | }; |
78 | let source_file = db.hir_parse(file_id); | 78 | if let Some(node) = db.parse_or_expand(file_id) { |
79 | collector.process_module(None, &*source_file); | 79 | if let Some(source_file) = ast::SourceFile::cast(&node) { |
80 | collector.process_module(None, &*source_file); | ||
81 | } | ||
82 | } | ||
80 | (Arc::new(collector.raw_items), Arc::new(collector.source_map)) | 83 | (Arc::new(collector.raw_items), Arc::new(collector.source_map)) |
81 | } | 84 | } |
82 | 85 | ||