From da0b348ae9f629c5cbe4a836a90ed85e36ca18e5 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 8 Jan 2019 11:28:42 +0300 Subject: migrate ra_hir to rowan 2.0 --- crates/ra_hir/src/code_model_api.rs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'crates/ra_hir/src/code_model_api.rs') diff --git a/crates/ra_hir/src/code_model_api.rs b/crates/ra_hir/src/code_model_api.rs index 09b532f74..43cddb504 100644 --- a/crates/ra_hir/src/code_model_api.rs +++ b/crates/ra_hir/src/code_model_api.rs @@ -1,6 +1,6 @@ use relative_path::RelativePathBuf; use ra_db::{CrateId, Cancelable, FileId}; -use ra_syntax::{ast, SyntaxNode}; +use ra_syntax::{ast, TreePtr, SyntaxNode}; use crate::{Name, db::HirDatabase, DefId, Path, PerNs, nameres::ModuleScope}; @@ -36,8 +36,8 @@ pub struct Module { } pub enum ModuleSource { - SourceFile(ast::SourceFileNode), - Module(ast::ModuleNode), + SourceFile(TreePtr), + Module(TreePtr), } #[derive(Clone, Debug, Hash, PartialEq, Eq)] @@ -66,7 +66,7 @@ impl Module { pub fn declaration_source( &self, db: &impl HirDatabase, - ) -> Cancelable> { + ) -> Cancelable)>> { self.declaration_source_impl(db) } @@ -104,7 +104,10 @@ impl Module { pub fn resolve_path(&self, db: &impl HirDatabase, path: &Path) -> Cancelable> { self.resolve_path_impl(db, path) } - pub fn problems(&self, db: &impl HirDatabase) -> Cancelable> { + pub fn problems( + &self, + db: &impl HirDatabase, + ) -> Cancelable, Problem)>> { self.problems_impl(db) } } -- cgit v1.2.3