From cdca39706121b2d1734a94938a2372da881e10c6 Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Tue, 25 Dec 2018 21:14:13 +0100 Subject: Add a hir::TypeRef as an intermediate between ast::TypeRef and ty::Ty --- crates/ra_hir/src/module.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/ra_hir/src/module.rs') diff --git a/crates/ra_hir/src/module.rs b/crates/ra_hir/src/module.rs index e1a0e4b59..b9d36f01f 100644 --- a/crates/ra_hir/src/module.rs +++ b/crates/ra_hir/src/module.rs @@ -115,7 +115,7 @@ impl Module { Ok(res) } - pub fn resolve_path(&self, db: &impl HirDatabase, path: Path) -> Cancelable> { + pub fn resolve_path(&self, db: &impl HirDatabase, path: &Path) -> Cancelable> { let mut curr_per_ns = PerNs::types( match path.kind { PathKind::Crate => self.crate_root(), @@ -131,7 +131,7 @@ impl Module { .def_id(db), ); - let segments = path.segments; + let segments = &path.segments; for name in segments.iter() { let curr = if let Some(r) = curr_per_ns.as_ref().take(Namespace::Types) { r -- cgit v1.2.3