]> git.lizzy.rs Git - rust.git/blob - crates/ra_hir/src/lib.rs
move completion item tests closer to the code
[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
27 mod code_model_api;
28 mod code_model_impl;
29
30 #[cfg(test)]
31 mod marks;
32
33 use crate::{
34     db::HirDatabase,
35     name::{AsName, KnownName},
36     ids::{DefKind, SourceItemId, SourceFileItems},
37 };
38
39 pub use self::{
40     path::{Path, PathKind},
41     name::Name,
42     ids::{HirFileId, DefId, DefLoc, MacroCallId, MacroCallLoc},
43     macros::{MacroDef, MacroInput, MacroExpansion},
44     nameres::{ItemMap, PerNs, Namespace, Resolution},
45     ty::Ty,
46     impl_block::{ImplBlock, ImplItem},
47     code_model_impl::function::{FnScopes, ScopesWithSyntaxMapping},
48 };
49
50 pub use self::code_model_api::{
51     Crate, CrateDependency,
52     Def,
53     Module, ModuleSource, Problem,
54     Struct, Enum, EnumVariant,
55     Function, FnSignature, ScopeEntryWithSyntax,
56     StructField,
57     Static, Const,
58     Trait, Type,
59 };