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 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, Resolution},
59 impl_block::{ImplBlock, ImplItem},
60 code_model_impl::function::{FnScopes, ScopesWithSyntaxMapping},
61 docs::{Docs, Documentation}
64 pub use self::code_model_api::{
65 Crate, CrateDependency,
67 Module, ModuleDef, ModuleSource, Problem,
68 Struct, Enum, EnumVariant,
69 Function, FnSignature, ScopeEntryWithSyntax,