From 188b0f96f98feaa0771f941343887c46113c8ced Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 22 May 2021 16:53:47 +0300 Subject: Add more docs --- crates/hir/src/db.rs | 7 +++++-- crates/hir/src/diagnostics.rs | 6 +++++- 2 files changed, 10 insertions(+), 3 deletions(-) (limited to 'crates/hir') diff --git a/crates/hir/src/db.rs b/crates/hir/src/db.rs index ffc8155b9..19898f683 100644 --- a/crates/hir/src/db.rs +++ b/crates/hir/src/db.rs @@ -1,5 +1,8 @@ -//! FIXME: write short doc here - +//! Re-exports various subcrates databases so that the calling code can depend +//! only on `hir`. This breaks abstraction boundary a bit, it would be cool if +//! we didn't do that. +//! +//! But we need this for at least LRU caching at the query level. pub use hir_def::db::*; pub use hir_expand::db::{ AstDatabase, AstDatabaseStorage, AstIdMapQuery, HygieneFrameQuery, InternMacroQuery, diff --git a/crates/hir/src/diagnostics.rs b/crates/hir/src/diagnostics.rs index b1ebba516..414c3f35e 100644 --- a/crates/hir/src/diagnostics.rs +++ b/crates/hir/src/diagnostics.rs @@ -1,4 +1,8 @@ -//! FIXME: write short doc here +//! Re-export diagnostics such that clients of `hir` don't have to depend on +//! low-level crates. +//! +//! This probably isn't the best way to do this -- ideally, diagnistics should +//! be expressed in terms of hir types themselves. pub use hir_def::diagnostics::{ InactiveCode, UnresolvedMacroCall, UnresolvedModule, UnresolvedProcMacro, }; -- cgit v1.2.3