Crate ra_ap_hir_def[][src]

Expand description

hir_def crate contains everything between macro expansion and type inference.

It defines various items (structs, enums, traits) which comprises Rust code, as well as an algorithm for resolving paths to such entities.

Note that hir_def is a work in progress, so not all of the above is actually true.

Modules

Defines hir-level representation of structs, enums and unions

A higher level attributes based on TokenTree, with also some shortcuts.

Defines Body: a lowered representation of bodies of functions, statics and consts.

Builtin attributes resolved by nameres.

This module defines built-in types.

When constructing hir, we start at some parent syntax node and recursively lower the children.

Contains basic data about various HIR declarations.

Defines database & queries for name resolution.

This module defines a DynMap – a container for heterogeneous maps.

This module describes hir-level representation of expressions.

An algorithm to find a path to refer to a certain item.

Many kinds of items or constructs can have generic parameters: functions, structs, impls, traits, etc. This module provides a common HIR for these generic parameters. See also the Generics type and the generics_of query in rustc.

A map of all publicly exported items in a crate.

Global Arc-based object interning infrastructure.

Describes items defined or visible (ie, imported) in a certain scope. This is shared between modules and blocks.

A simplified AST that only contains items.

keys to be used with DynMap

Collects lang items: items marked with #[lang = "..."] attribute.

This module implements import-resolution/macro expansion algorithm.

A desugared representation of paths like crate::foo or <Type as Trait>::bar.

In rust, it is possible to have a value, a type and a macro with the same name without conflicts.

Name resolution façade.

Utilities for mapping between hir IDs and the surface syntax.

HIR for references to types. Paths in these are not yet resolved. They can be directly created from an ast::TypeRef, without further queries.

Defines hir-level representation of visibility (e.g. pub and pub(crate)).

Macros

Structs

Enums

A Data Type

The defs which have a body.

A generic param

The defs which can be visible in the module.

Traits

A helper trait for converting to MacroCallId

Type Definitions