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 {
32 pub mod source_binder;
44 src::HasSource, Adt, AssocItem, AttrDef, Const, Container, Crate, CrateDependency,
45 DefWithBody, Docs, Enum, EnumVariant, FieldSource, Function, GenericDef, GenericParam,
46 HasAttrs, ImplBlock, Import, Local, MacroDef, Module, ModuleDef, ModuleSource, ScopeDef,
47 Static, Struct, StructField, Trait, Type, TypeAlias, Union, VariantDef,
49 from_source::FromSource,
50 source_binder::{PathResolution, ScopeEntryWithSyntax, SourceAnalyzer},
53 primitive::{FloatBitness, FloatTy, IntBitness, IntTy, Signedness, Uncertain},
54 ApplicationTy, CallableDef, Substs, TraitRef, Ty, TypeCtor, TypeWalk,
59 body::scope::ExprScopes,
60 builtin_type::BuiltinType,
62 path::{Path, PathKind},
66 name::Name, HirFileId, InFile, MacroCallId, MacroCallLoc, MacroDefId, MacroFile,