From 976a3226fe0f145dfefd473e9fecd63d58aca50e Mon Sep 17 00:00:00 2001 From: Jonas Schievink Date: Thu, 6 May 2021 19:59:54 +0200 Subject: Don't store call-site text offsets in hygiene info --- crates/hir_def/src/visibility.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'crates/hir_def/src/visibility.rs') diff --git a/crates/hir_def/src/visibility.rs b/crates/hir_def/src/visibility.rs index d4b7c9970..83500f54e 100644 --- a/crates/hir_def/src/visibility.rs +++ b/crates/hir_def/src/visibility.rs @@ -33,17 +33,19 @@ impl RawVisibility { db: &dyn DefDatabase, node: InFile>, ) -> RawVisibility { - Self::from_ast_with_hygiene(node.value, &Hygiene::new(db.upcast(), node.file_id)) + Self::from_ast_with_hygiene(db, node.value, &Hygiene::new(db.upcast(), node.file_id)) } pub(crate) fn from_ast_with_hygiene( + db: &dyn DefDatabase, node: Option, hygiene: &Hygiene, ) -> RawVisibility { - Self::from_ast_with_hygiene_and_default(node, RawVisibility::private(), hygiene) + Self::from_ast_with_hygiene_and_default(db, node, RawVisibility::private(), hygiene) } pub(crate) fn from_ast_with_hygiene_and_default( + db: &dyn DefDatabase, node: Option, default: RawVisibility, hygiene: &Hygiene, @@ -54,7 +56,7 @@ impl RawVisibility { }; match node.kind() { ast::VisibilityKind::In(path) => { - let path = ModPath::from_src(path, hygiene); + let path = ModPath::from_src(db, path, hygiene); let path = match path { None => return RawVisibility::private(), Some(path) => path, -- cgit v1.2.3