Expand description
THIR datatypes and definitions. See the rustc dev guide for more info.
If you compare the THIR ExprKind to hir::ExprKind, you will see it is
a good bit simpler. In fact, a number of the more straight-forward
MIR simplifications are already done in the lowering to THIR. For
example, method calls and overloaded operators are absent: they are
expected to be converted into ExprKind::Call instances.
Re-exportsยง
use std::cmp::Ordering;๐use std::fmt;๐use std::ops::Index;๐use std::sync::Arc;๐use rustc_abi::FieldIdx;๐use rustc_abi::Integer;๐use rustc_abi::Size;๐use rustc_abi::VariantIdx;๐use rustc_ast::AsmMacro;๐use rustc_ast::InlineAsmOptions;๐use rustc_ast::InlineAsmTemplatePiece;๐use rustc_ast::Mutability;๐use rustc_attr_ir::UnrollAttr;๐use rustc_data_structures::fx::FxIndexMap;๐use rustc_data_structures::thin_vec::ThinVec;๐use rustc_hir as hir;๐use rustc_hir::def_id::DefId;๐use rustc_hir::BindingMode;๐use rustc_hir::ByRef;๐use rustc_hir::HirId;๐use rustc_hir::MatchSource;๐use rustc_hir::RangeEnd;๐use rustc_index::IndexVec;๐use rustc_index::newtype_index;๐use rustc_macros::StableHash;๐use rustc_macros::TyDecodable;๐use rustc_macros::TyEncodable;๐use rustc_macros::TypeVisitable;๐use rustc_span::def_id::LocalDefId;๐use rustc_span::ErrorGuaranteed;๐use rustc_span::Span;๐use rustc_span::Symbol;๐use rustc_span::bug;๐use rustc_target::asm::InlineAsmRegOrRegClass;๐use tracing::instrument;๐use tracing::instrument;๐use crate::middle::region;๐use crate::mir::interpret::AllocId;๐use crate::mir;๐use crate::mir::AssignOp;๐use crate::mir::BinOp;๐use crate::mir::BorrowKind;๐use crate::mir::FakeReadCause;๐use crate::mir::UnOp;๐use crate::thir::visit::for_each_immediate_subpat;๐use crate::ty::adjustment::PointerCoercion;๐use crate::ty::layout::IntegerExt;๐use crate::ty;๐use crate::ty::AdtDef;๐use crate::ty::CanonicalUserType;๐use crate::ty::CanonicalUserTypeAnnotation;๐use crate::ty::FnSig;๐use crate::ty::GenericArgsRef;๐use crate::ty::Ty;๐use crate::ty::TyCtxt;๐use crate::ty::UpvarArgs;๐
Modulesยง
- size_
asserts ๐ - visit
Macrosยง
- thir_
with_ ๐elements
Structsยง
- AdtExpr
- Arm
- A
matcharm. - ArmId
- Ascription
- Block
- BlockId
- Closure
Expr - Expr
- A THIR expression.
- ExprId
- Field
Expr - Represents the association of a field identifier and an expression.
- Field
Pat - FruInfo
- Inline
AsmExpr - Local
VarId - Loop
Match Match Data - The
matchpart of a#[loop_match] - Param
- Description of a type-checked function parameter.
- ParamId
- Pat
- PatExtra
- Additional per-node data that is not present on most THIR pattern nodes.
- PatRange
- A range pattern. The boundaries must be of the same type and that type must be numeric.
- Stmt
- StmtId
- Thir
- A container for a THIR body.
Enumsยง
- AdtExpr
Base - Block
Safety - BodyTy
- Deref
PatBorrow Mode - Expr
Kind - Inline
AsmOperand - Logical
Op - PatKind
- PatRange
Boundary - A (possibly open) boundary of a range pattern. If present, the const must be of a numeric type.
- Stmt
Kind
Type Aliasesยง
- UserTy ๐