From 069bf55cca1e1be1f6cdd28b638f691e059858dc Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Tue, 24 Dec 2019 20:32:42 +0100 Subject: Add infrastructure for visibility on syntax and hir_def level --- crates/ra_hir_def/src/db.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'crates/ra_hir_def/src/db.rs') diff --git a/crates/ra_hir_def/src/db.rs b/crates/ra_hir_def/src/db.rs index c55fd4111..1761e2187 100644 --- a/crates/ra_hir_def/src/db.rs +++ b/crates/ra_hir_def/src/db.rs @@ -14,9 +14,10 @@ use crate::{ generics::GenericParams, lang_item::{LangItemTarget, LangItems}, nameres::{raw::RawItems, CrateDefMap}, + visibility::Visibility, AttrDefId, ConstId, ConstLoc, DefWithBodyId, EnumId, EnumLoc, FunctionId, FunctionLoc, GenericDefId, ImplId, ImplLoc, ModuleId, StaticId, StaticLoc, StructId, StructLoc, TraitId, - TraitLoc, TypeAliasId, TypeAliasLoc, UnionId, UnionLoc, + TraitLoc, TypeAliasId, TypeAliasLoc, UnionId, UnionLoc, VisibilityDefId, }; #[salsa::query_group(InternDatabaseStorage)] @@ -90,6 +91,9 @@ pub trait DefDatabase: InternDatabase + AstDatabase { #[salsa::invoke(Attrs::attrs_query)] fn attrs(&self, def: AttrDefId) -> Attrs; + #[salsa::invoke(Visibility::visibility_query)] + fn visibility(&self, def: VisibilityDefId) -> Visibility; + #[salsa::invoke(LangItems::module_lang_items_query)] fn module_lang_items(&self, module: ModuleId) -> Option>; -- cgit v1.2.3