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 {
24 pub mod source_binder;
47 db::{HirDatabase, PersistentHirDatabase},
48 name::{AsName, KnownName},
49 ids::{SourceItemId, SourceFileItems},
53 path::{Path, PathKind},
55 ids::{HirFileId, MacroCallId, MacroCallLoc, HirInterner},
56 macros::{MacroDef, MacroInput, MacroExpansion},
57 nameres::{ItemMap, PerNs, Namespace},
59 impl_block::{ImplBlock, ImplItem},
60 docs::{Docs, Documentation},
62 expr::{ExprScopes, ScopesWithSyntaxMapping, ScopeEntryWithSyntax},
63 resolve::{Resolver, Resolution},
66 pub use self::code_model_api::{
67 Crate, CrateDependency,
69 Module, ModuleDef, ModuleSource, Problem,
70 Struct, Enum, EnumVariant,
71 Function, FnSignature,
72 StructField, FieldSource,