]> git.lizzy.rs Git - rust.git/blob - crates/ra_hir/src/lib.rs
Add way of getting docs from the code model and use for completion
[rust.git] / crates / ra_hir / src / lib.rs
1 //! HIR (previously known as descriptors) provides a high-level object oriented
2 //! access to Rust code.
3 //!
4 //! The principal difference between HIR and syntax trees is that HIR is bound
5 //! to a particular crate instance. That is, it has cfg flags and features
6 //! applied. So, the relation between syntax and HIR is many-to-one.
7
8 pub mod db;
9 #[cfg(test)]
10 mod mock;
11 mod query_definitions;
12 mod path;
13 pub mod source_binder;
14
15 mod ids;
16 mod macros;
17 mod name;
18 mod module_tree;
19 mod nameres;
20 mod adt;
21 mod type_ref;
22 mod ty;
23 mod impl_block;
24 mod expr;
25 mod generics;
26 mod docs;
27
28 mod code_model_api;
29 mod code_model_impl;
30
31 #[cfg(test)]
32 mod marks;
33
34 use crate::{
35     db::HirDatabase,
36     name::{AsName, KnownName},
37     ids::{DefKind, SourceItemId, SourceFileItems},
38 };
39
40 pub use self::{
41     path::{Path, PathKind},
42     name::Name,
43     ids::{HirFileId, DefId, DefLoc, MacroCallId, MacroCallLoc},
44     macros::{MacroDef, MacroInput, MacroExpansion},
45     nameres::{ItemMap, PerNs, Namespace, Resolution},
46     ty::Ty,
47     impl_block::{ImplBlock, ImplItem},
48     code_model_impl::function::{FnScopes, ScopesWithSyntaxMapping},
49     docs::{Docs, Documentation}
50 };
51
52 pub use self::code_model_api::{
53     Crate, CrateDependency,
54     Def,
55     Module, ModuleSource, Problem,
56     Struct, Enum, EnumVariant,
57     Function, FnSignature, ScopeEntryWithSyntax,
58     StructField,
59     Static, Const,
60     Trait, Type,
61 };