Re-exports§
pub use hax_frontend_exporter_options as options;
pub use crate::*;
pub use crate::prelude::*;
pub use crate::state::*;
Modules§
- Enumerates the kinds of Mir bodies. TODO: use const generics instead of an open list of types.
Macros§
- Generates a
RootSchema
for the given type using default settings.
Structs§
- Reflects
rustc_middle::ty::AdtDef
- Reflects
rustc_middle::thir::AdtExpr
- This type merges the information from
rustc_type_ir::AliasKind
andrustc_middle::ty::AliasTy
- Reflects [
rustc_hir::AnonConst
] - Reflects
rustc_middle::thir::Arm
- Reflects
rustc_middle::thir::Ascription
- Reflects
rustc_middle::ty::AssocItem
- Reflects
rustc_ast::ast::AttrItem
- Reflects
rustc_ast::ast::Attribute
- Reflects
rustc_middle::ty::Binder
- Reflects
rustc_ast::ast::BindingMode
- Reflects
rustc_middle::thir::Block
- Reflects
rustc_middle::ty::BoundRegion
- Reflects
rustc_middle::ty::BoundTy
- Reflects
rustc_middle::ty::Clause
and adds a hash-consed predicate identifier. - Reflects [
rustc_middle::ty::ClosureArgs
] - Reflects
rustc_middle::ty::CoercePredicate
- Reflects [
rustc_hir::ConstArg
] - Generic container for decorating items with a type, a span, attributes and other meta-data.
- Reflects
rustc_hir::def_id::DefId
- Reflects
rustc_ast::ast::DelimArgs
- Reflects [
rustc_hir::definitions::DisambiguatedDefPathData
] - Reflects
rustc_middle::ty::util::Discr
- Reflects
rustc_middle::ty::EarlyParamRegion
- Reflects [
rustc_type_ir::ExistentialProjection
] - Reflects [
rustc_type_ir::ExistentialTraitRef
] - Reflects
rustc_span::hygiene::ExpnData
- Reflects
rustc_middle::ty::FieldDef
- A field expression: a field name along with a value
- A field pattern: a field name along with a pattern
- Reflects [
rustc_hir::FnDecl
] - Function definition
- Reflects [
rustc_hir::FnHeader
] - Reflects [
rustc_hir::FnSig
] - Reflects [
rustc_hir::ForeignItem
] - Field Record Update (FRU) informations, this reflects
rustc_middle::thir::FruInfo
- Gathers a lot of definition information about a
rustc_hir::def_id::DefId
. - Reflects [
rustc_hir::GenericParam
] - Reflects
rustc_middle::ty::GenericParamDef
- Reflects
rustc_middle::ty::GenericPredicates
- Reflects [
rustc_hir::Generics
] - A hash map implemented with quadratic probing and SIMD lookup.
- Reflects [
rustc_hir::FieldDef
] - Reflects [
rustc_hir::hir_id::HirId
] - Reflects [
rustc_hir::Impl
]. - An
ImplExpr
describes the full data of a trait implementation. Because of generics, this may need to combine several concrete trait implementation items. For example,((1u8, 2u8), "hello").clone()
combines the generic implementation ofClone
for(A, B)
with the concrete implementations foru8
and&str
, represented as a tree. - Meta-informations about an
impl<GENERICS[: PREDICATES]> TRAIT for TYPE where PREDICATES {}
- Reflects [
rustc_hir::ImplItem
] - Reflects [
rustc_hir::Item
] (and [rustc_hir::ItemId
]) - Reflects
rustc_middle::ty::LateParamRegion
- Reflects [
rustc_hir::Lifetime
] - Reflects
rustc_span::Loc
- Reflects
rustc_middle::thir::LocalVarId
- Reflects
rustc_ast::ast::MacCall
- Reflects
rustc_ast::ast::MacroDef
- Describe a macro invocation, using [
macro_invocation_of_raw_mac_invocation
] - Reflects
rustc_ast::ast::MetaItemLit
- Reflects
rustc_ast::ast::NormalAttr
- Reflects [
rustc_hir::OpaqueTy
] - Reflects
rustc_middle::ty::OutlivesPredicate
as a named struct instead of a tuple struct. This is because the script converting JSONSchema types to OCaml doesn’t support tuple structs, and this is the only tuple struct in the whole AST. - Reflects
rustc_middle::thir::Param
- Reflects
rustc_middle::ty::ParamConst
- Reflects
rustc_middle::ty::ParamTy
- We use this to store information about the parameters in parent blocks. This is necessary because when querying the generics of a definition, rustc gives us all the generics used in this definition, including those coming from the outer impl block.
- Reflects
rustc_middle::thir::PatRange
- An owned, mutable path (akin to
String
). - Reflects [
rustc_hir::PathSegment
] - Reflects
rustc_middle::ty::Placeholder
- Reflects
rustc_middle::ty::Predicate
and adds a hash-consed predicate identifier. - A
PredicateId
is a unique identifier for a clause or a predicate. It is computed by hashing predicates and clause in a uniform and deterministic way. - Expresses a constraints over an associated type.
- A single-threaded reference-counting pointer. ‘Rc’ stands for ‘Reference Counted’.
- Reflects
rustc_middle::ty::Region
- Reflects [
rustc_middle::ty::ReprOptions
] - Reflects
rustc_middle::mir::BinOp
- Reflects
rustc_span::Span
- Reflects
rustc_span::source_map::Spanned
- Reflects
rustc_middle::thir::Stmt
- Reflects
rustc_middle::ty::SubtypePredicate
- Reflects
rustc_ast::token::Token
- Reflects [
rustc_hir::TraitItem
] - Reflects
rustc_middle::ty::TraitPredicate
- Reflects
rustc_middle::ty::TraitRef
- Reflects
rustc_middle::ty::FnSig
- Reflects
rustc_middle::ty::Generics
- Reflects
rustc_middle::ty::TypeAndMut
- Reflects [
rustc_hir::UsePath
] - Reflects
rustc_middle::ty::UserArgs
- Reflects
rustc_middle::ty::UserSelfTy
- Reflects [
rustc_hir::Variant
] - Reflects
rustc_middle::ty::VariantDef
- Describe a variant
- A
DefId
identifies a particular definition, by combining a crate index and a def index. - A
LocalDefId
is equivalent to aDefId
withkrate == LOCAL_CRATE
. Since we encode this information in the type, we can ensure at compile time that noDefId
s from upstream crates get thrown into the mix. There are quite a few cases where we know that onlyDefId
s from the local crate are expected; aDefId
from a different crate would signify a bug somewhere. This is whenLocalDefId
comes in handy.
Enums§
- Reflects
rustc_middle::ty::AdtKind
- Reflects [
rustc_middle::ty::AliasKind
] - Reflects [
rustc_middle::ty::AliasRelationDirection
] - Reflects [
rustc_hir::AssocItemKind
] - Reflects
rustc_middle::ty::AssocKind
- Reflects
rustc_span::hygiene::AstPass
- Reflects
rustc_ast::ast::AttrArgs
- Reflects
rustc_ast::ast::AttrArgsEq
- Reflects
rustc_ast::AttrKind
- Reflects
rustc_ast::ast::AttrStyle
- Reflects
rustc_middle::mir::BinOp
- Reflects
rustc_ast::token::BinOpToken
- Reflects
rustc_middle::thir::BlockSafety
- Reflects
rustc_middle::mir::BorrowKind
- Reflects
rustc_middle::ty::BoundRegionKind
- Reflects
rustc_middle::ty::BoundTyKind
- Reflects
rustc_middle::ty::BoundVariableKind
- Reflects
rustc_ast::ast::ByRef
- Reflects [
rustc_middle::infer::canonical::CanonicalTyVarKind
] - Reflects [
rustc_middle::infer::canonical::CanonicalVarKind
] - Reflects
rustc_middle::ty::ClauseKind
- Reflects [
rustc_middle::ty::ClosureKind
] - Reflects
rustc_ast::token::CommentKind
- Reflects [
rustc_hir::ConstArgKind
] - The subset of Expr that corresponds to constants.
- Reflects [
rustc_hir::Constness
] - Reflects [
rustc_hir::def::CtorKind
] - Reflects [
rustc_hir::def::CtorOf
] - Reflects [
rustc_hir::definitions::DefPathData
] - Reflects [
rustc_hir::Defaultness
] - Reflects
rustc_ast::token::Delimiter
- Reflects
rustc_span::hygiene::DesugaringKind
- Reflects
rustc_middle::ty::VariantDiscr
- Reflects [
rustc_middle::ty::DynKind
] - Reflects
rustc_span::edition::Edition
- A predicate without
Self
, for use indyn Trait
. - Reflects
rustc_span::hygiene::ExpnKind
- Reflects
rustc_middle::thir::ExprKind
- Reflects
rustc_middle::mir::FakeBorrowKind
- Reflects
rustc_span::FileName
- Reflects [
rustc_type_ir::FloatTy
] - Reflects [
rustc_hir::FnRetTy
] - Reflects [
rustc_hir::ForeignItemKind
] - Imbues [
rustc_hir::def::DefKind
] with a lot of extra information. Important: theowner_id()
must be the id of this definition. - Reflects both
rustc_middle::ty::GenericArg
andrustc_middle::ty::GenericArgKind
- Reflects [
rustc_hir::GenericParamKind
] - The source of a particular trait implementation. Most often this is either
Concrete
for a concreteimpl Trait for Type {}
item, orLocalBound
for a context-boundwhere T: Trait
. - Reflects [
rustc_hir::ImplItemKind
], inlining the body of the items. - Reflects
rustc_hir::ImplPolarity
- Reflects
rustc_middle::ty::ImplSubject
- Reflects [
rustc_hir::ImplicitSelfKind
] - Reflects partially [
rustc_middle::ty::InferTy
] - Reflects [
rustc_attr::InlineAttr
] - Reflects [
rustc_type_ir::IntTy
] - Reflects [
rustc_hir::IsAsync
] - Reflects
rustc_hir::IsAuto
- Reflects [
rustc_hir::ItemKind
] - Reflects [
rustc_hir::LifetimeName
] - Reflects [
rustc_hir::LifetimeParamKind
] - Reflects
rustc_middle::thir::LintLevel
- Reflects
rustc_ast::ast::LitFloatType
- Reflects both
rustc_middle::ty::GenericArg
andrustc_middle::ty::GenericArgKind
- Reflects
rustc_ast::ast::LitKind
- Reflects
rustc_middle::thir::LogicalOp
- Reflects
rustc_span::hygiene::MacroKind
- Reflects [
rustc_hir::Movability
] - Reflects
rustc_middle::mir::MutBorrowKind
- Reflects [
rustc_hir::def::NonMacroAttrKind
] - Reflects [
rustc_hir::OpaqueTyOrigin
] - Reflects [
rustc_hir::ParamName
] - Reflects
rustc_middle::thir::PatKind
- Reflects
rustc_middle::thir::PatRangeBoundary
- Reflects
rustc_middle::ty::PredicateKind
- Reflects [
rustc_hir::PredicateOrigin
] - Reflects [
rustc_hir::PrimTy
] - Reflects [
rustc_hir::RangeEnd
] - Reflects
rustc_span::RealFileName
- Reflects
rustc_middle::ty::RegionKind
- Reflects [
rustc_hir::def::Res
] - Reflects [
rustc_hir::Safety
] - Reflects
rustc_middle::mir::BinOp
- Reflects
rustc_ast::tokenstream::Spacing
- Reflects
rustc_middle::thir::StmtKind
- Reflects
rustc_ast::ast::StrStyle
- Reflects
rustc_middle::ty::Term
- Reflects
rustc_ast::token::TokenKind
- Reflects
rustc_ast::tokenstream::TokenTree
- Reflects [
rustc_hir::TraitItemKind
] - Reflects
rustc_middle::ty::TyKind
- Reflects [
rustc_type_ir::UintTy
] - Reflects
rustc_middle::mir::UnOp
- Reflects [
rustc_hir::UseKind
] - Reflects
rustc_middle::ty::UserType
: this is currently disabled, and everything is printed as debug in theUserType::Todo
variant. - Reflects [
rustc_middle::ty::Variance
] - Reflects [
rustc_hir::VariantData
] - Reflects
rustc_middle::ty::Visibility
Traits§
- A data structure that can be deserialized from any data format supported by Serde.
- A type which can be described as a JSON Schema document.
- A data structure that can be serialized into any data format supported by Serde.
Functions§
- Compute the parameters information for a definition. See ParamsInfo.
- Retrieve the trait information, typically for a function call. TODO: rename
- Solve the trait obligations for a specific item use (for example, a method call, an ADT, etc.).
- Given a clause
clause
in the context of some impl blockimpl_did
, susbts correctlySelf
fromclause
and (1) derive aClause
and (2) resolve anImplExpr
.
Type Aliases§
- Reflects
rustc_middle::ty::CanonicalUserType
- Rustc has different representation for constants: one for MIR (
rustc_middle::mir::Const
), one for the type system (rustc_middle::ty::ConstKind
). For simplicity hax maps those two construct to one sameConstantExpr
type. - Reflects
rustc_span::symbol::Ident
- Reflects
rustc_middle::ty::PlaceholderConst
- Reflects
rustc_middle::ty::PlaceholderRegion
- Reflects
rustc_middle::ty::PlaceholderType
- Reflects
rustc_middle::ty::PolyFnSig
- Reflects
rustc_ast::tokenstream::TokenStream
as a plain string. If you need to reshape that into Rust tokens or construct, please use, e.g.,syn
.