Skip to main content

Module hir

Module hir 

Source
Expand description

This module describes hir-level representation of expressions.

This representation is:

  1. Identity-based. Each expression has an id, so we can distinguish between different 1 in 1 + 1.
  2. Independent of syntax. Though syntactic provenance information can be attached separately via id-based side map.
  3. Unresolved. Paths are stored as sequences of names, and not as defs the names refer to.
  4. Desugared. There’s no if let.

See also a neighboring body module.

Modules§

format_args
Parses format_args input.
generics
Pre-type IR item generics
type_ref
HIR for references to types. Paths in these are not yet resolved. They can be directly created from an ast::TypeRef, without further queries.

Structs§

AsmOptions
Binding
ExprOrPatIdPacked
FloatTypeWrapper
InlineAsm
Label
MatchArm
OffsetOf
RecordFieldPat
RecordLitField

Enums§

ArithOp
Array
AsmOperand
BinaryOp
BindingAnnotation
Explicit binding annotations given in the HIR for a binding. Note that this is not the final binding mode that we infer after type inference.
BindingProblems
CaptureBy
ClosureKind
CmpOp
CoroutineKind
CoroutineSource
In the case of a coroutine created as part of an async/gen construct, which kind of async/gen construct caused it to be created?
Expr
ExprOrPatId
InlineAsmKind
InlineAsmRegOrRegClass
Item
Literal
LiteralOrConst
Used in range patterns.
LogicOp
LoopSource
The loop type that yielded an Expr::Loop.
Movability
Ordering
Pat
Close relative to rustc’s hir::PatKind
RangeOp
RecordSpread
Statement
UnaryOp
Unsafe

Type Aliases§

BindingId
ExprId
LabelId
PatId