]> git.lizzy.rs Git - rust.git/blob - crates/ra_hir/src/lib.rs
Merge #557
[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 #[macro_use]
12 mod marks;
13 mod query_definitions;
14 mod path;
15 pub mod source_binder;
16
17 mod ids;
18 mod macros;
19 mod name;
20 mod module_tree;
21 mod nameres;
22 mod adt;
23 mod type_ref;
24 mod ty;
25 mod impl_block;
26 mod expr;
27
28 mod code_model_api;
29 mod code_model_impl;
30
31 use crate::{
32     db::HirDatabase,
33     name::{AsName, KnownName},
34     ids::{DefKind, SourceItemId, SourceFileItemId, SourceFileItems},
35 };
36
37 pub use self::{
38     path::{Path, PathKind},
39     name::Name,
40     ids::{HirFileId, DefId, DefLoc, MacroCallId, MacroCallLoc},
41     macros::{MacroDef, MacroInput, MacroExpansion},
42     nameres::{ItemMap, PerNs, Namespace, Resolution},
43     ty::Ty,
44     impl_block::{ImplBlock, ImplItem},
45     code_model_impl::function::{FnScopes, ScopesWithSyntaxMapping},
46 };
47
48 pub use self::code_model_api::{
49     Crate, CrateDependency,
50     Def,
51     Module, ModuleSource, Problem,
52     Struct, Enum, EnumVariant,
53     Function, FnSignature, ScopeEntryWithSyntax,
54     Static, Const,
55     Trait, Type,
56 };