aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_def/src/nameres.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir_def/src/nameres.rs')
-rw-r--r--crates/ra_hir_def/src/nameres.rs8
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
58use std::sync::Arc; 58use std::sync::Arc;
59 59
60use either::Either;
60use hir_expand::{ 61use 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};
64use once_cell::sync::Lazy; 64use once_cell::sync::Lazy;
65use ra_arena::Arena; 65use 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 {}`.