1 //! HIR (previously known as descriptors) provides a high-level object oriented
2 //! access to Rust code.
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.
8 macro_rules! impl_froms {
9 ($e:ident: $($v:ident), *) => {
11 impl From<$v> for $e {
12 fn from(it: $v) -> $e {
23 mod query_definitions;
25 pub mod source_binder;
48 db::{HirDatabase, PersistentHirDatabase},
49 name::{AsName, KnownName},
50 ids::{SourceItemId, SourceFileItems},
54 path::{Path, PathKind},
56 ids::{HirFileId, MacroCallId, MacroCallLoc, HirInterner},
57 macros::{MacroDef, MacroInput, MacroExpansion},
58 nameres::{ItemMap, PerNs, Namespace},
60 impl_block::{ImplBlock, ImplItem},
61 docs::{Docs, Documentation},
63 expr::{ExprScopes, ScopesWithSyntaxMapping},
64 resolve::{Resolver, Resolution},
67 pub use self::code_model_api::{
68 Crate, CrateDependency,
70 Module, ModuleDef, ModuleSource, Problem,
71 Struct, Enum, EnumVariant,
72 Function, FnSignature, ScopeEntryWithSyntax,
73 StructField, FieldSource,