]> git.lizzy.rs Git - rust.git/blob - crates/ra_hir/src/lib.rs
remove FnSignatureInfo from hir
[rust.git] / crates / ra_hir / src / lib.rs
1 //! HIR (previsouly known as descriptors) provides a high-level OO acess to Rust
2 //! 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, there relation between syntax and HIR is many-to-one.
7
8 macro_rules! ctry {
9     ($expr:expr) => {
10         match $expr {
11             None => return Ok(None),
12             Some(it) => it,
13         }
14     };
15 }
16
17 pub mod db;
18 #[cfg(test)]
19 mod mock;
20 mod query_definitions;
21 mod path;
22 pub mod source_binder;
23
24 mod ids;
25 mod macros;
26 mod name;
27 mod module_tree;
28 mod nameres;
29 mod function;
30 mod adt;
31 mod type_ref;
32 mod ty;
33 mod impl_block;
34 mod expr;
35
36 mod code_model_api;
37 mod code_model_impl;
38
39 use crate::{
40     db::HirDatabase,
41     name::{AsName, KnownName},
42     ids::{DefKind, SourceItemId, SourceFileItemId, SourceFileItems},
43 };
44
45 pub use self::{
46     path::{Path, PathKind},
47     name::Name,
48     ids::{HirFileId, DefId, DefLoc, MacroCallId, MacroCallLoc},
49     macros::{MacroDef, MacroInput, MacroExpansion},
50     nameres::{ItemMap, PerNs, Namespace, Resolution},
51     function::{Function, FnSignature, FnScopes, ScopesWithSyntaxMapping},
52     ty::Ty,
53     impl_block::{ImplBlock, ImplItem},
54 };
55
56 pub use self::code_model_api::{
57     Crate, CrateDependency,
58     Module, ModuleSource, Problem,
59     Struct, Enum, VariantData, StructField,
60 };
61
62 pub enum Def {
63     Module(Module),
64     Function(Function),
65     Struct(Struct),
66     Enum(Enum),
67     Item,
68 }