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 #![recursion_limit = "512"]
10 macro_rules! impl_froms {
11 ($e:ident: $($v:ident $(($($sv:ident),*))?),*) => {
13 impl From<$v> for $e {
14 fn from(it: $v) -> $e {
19 impl From<$sv> for $e {
20 fn from(it: $sv) -> $e {
30 pub mod source_binder;
42 Adt, AssocItem, AttrDef, Const, Crate, CrateDependency, DefWithBody, Docs, Enum,
43 EnumVariant, FieldSource, Function, GenericDef, HasAttrs, ImplBlock, Local, MacroDef,
44 Module, ModuleDef, ScopeDef, Static, Struct, StructField, Trait, Type, TypeAlias,
45 TypeParam, Union, VariantDef,
47 from_source::FromSource,
48 has_source::HasSource,
49 source_binder::{PathResolution, ScopeEntryWithSyntax, SourceAnalyzer},
53 body::scope::ExprScopes,
54 builtin_type::BuiltinType,
56 nameres::ModuleSource,
57 path::{ModPath, Path, PathKind},
61 name::Name, HirFileId, InFile, MacroCallId, MacroCallLoc, MacroDefId, MacroFile, Origin,
63 pub use hir_ty::{display::HirDisplay, CallableDef};