diff options
Diffstat (limited to 'crates/ra_hir_def/src/nameres.rs')
-rw-r--r-- | crates/ra_hir_def/src/nameres.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_hir_def/src/nameres.rs b/crates/ra_hir_def/src/nameres.rs index 3e1521870..faf3566f4 100644 --- a/crates/ra_hir_def/src/nameres.rs +++ b/crates/ra_hir_def/src/nameres.rs | |||
@@ -57,9 +57,9 @@ mod tests; | |||
57 | 57 | ||
58 | use std::sync::Arc; | 58 | use std::sync::Arc; |
59 | 59 | ||
60 | use either::Either; | ||
60 | use hir_expand::{ | 61 | use hir_expand::{ |
61 | ast_id_map::FileAstId, diagnostics::DiagnosticSink, either::Either, name::Name, InFile, | 62 | ast_id_map::FileAstId, diagnostics::DiagnosticSink, name::Name, InFile, MacroDefId, |
62 | MacroDefId, | ||
63 | }; | 63 | }; |
64 | use once_cell::sync::Lazy; | 64 | use once_cell::sync::Lazy; |
65 | use ra_arena::Arena; | 65 | use ra_arena::Arena; |
@@ -287,10 +287,10 @@ impl ModuleData { | |||
287 | ) -> InFile<Either<ast::SourceFile, ast::Module>> { | 287 | ) -> InFile<Either<ast::SourceFile, ast::Module>> { |
288 | if let Some(file_id) = self.definition { | 288 | if let Some(file_id) = self.definition { |
289 | let sf = db.parse(file_id).tree(); | 289 | let sf = db.parse(file_id).tree(); |
290 | return InFile::new(file_id.into(), Either::A(sf)); | 290 | return InFile::new(file_id.into(), Either::Left(sf)); |
291 | } | 291 | } |
292 | let decl = self.declaration.unwrap(); | 292 | let decl = self.declaration.unwrap(); |
293 | InFile::new(decl.file_id, Either::B(decl.to_node(db))) | 293 | InFile::new(decl.file_id, Either::Right(decl.to_node(db))) |
294 | } | 294 | } |
295 | 295 | ||
296 | /// Returns a node which declares this module, either a `mod foo;` or a `mod foo {}`. | 296 | /// Returns a node which declares this module, either a `mod foo;` or a `mod foo {}`. |