Re-exports§
pub use crate::id_table;
pub use hax_frontend_exporter_options as options;
pub use crate::*;
pub use crate::prelude::*;
pub use crate::state::*;
Modules§
- body 🔒
- Enumerates the kinds of Mir bodies. TODO: use const generics instead of an open list of types.
- prelude 🔒
- sinto 🔒
- traits 🔒
- types 🔒
- utils 🔒
Macros§
- Generates a
RootSchema
for the given type using default settings.
Structs§
- Reflects
ty::AdtDef
- Reflects
thir::AdtExpr
- This type merges the information from
rustc_type_ir::AliasKind
andty::AliasTy
- Reflects
hir::AnonConst
- Reflects
thir::Arm
- Reflects
thir::Ascription
- Reflects
ty::AssocItem
- Reflects
rustc_ast::ast::AttrItem
- Reflects
rustc_ast::ast::Attribute
- Reflects
ty::Binder
- Reflects
rustc_ast::ast::BindingMode
- Reflects
thir::Block
- Reflects
ty::BoundRegion
- Reflects
ty::BoundTy
- Reflects
ty::CanonicalUserTypeAnnotation
- Reflects
ty::Clause
and adds a hash-consed predicate identifier. - Reflects
ty::ClosureArgs
- Reflects
ty::CoercePredicate
- Reflects
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
ty::util::Discr
- Reflects
ty::EarlyParamRegion
- Reflects
rustc_type_ir::ExistentialProjection
- Reflects
rustc_type_ir::ExistentialTraitRef
- Reflects
rustc_span::hygiene::ExpnData
- Reflects
ty::FieldDef
- A field expression: a field name along with a value
- A field pattern: a field name along with a pattern
- Reflects
hir::FnDecl
- Function definition
- Reflects
hir::FnHeader
- Reflects
hir::FnSig
- Reflects
hir::ForeignItem
- Field Record Update (FRU) informations, this reflects
thir::FruInfo
- Gathers a lot of definition information about a
rustc_hir::def_id::DefId
. - Reflects
hir::GenericParam
- Reflects
ty::GenericParamDef
- Reflects
ty::GenericPredicates
- Reflects
hir::Generics
- A hash map implemented with quadratic probing and SIMD lookup.
- Reflects
hir::FieldDef
- Reflects
hir::hir_id::HirId
- Reflects
hir::Impl
. - An associated item in a trait impl. This can be an item provided by the trait impl, or an item that reuses the trait decl default value.
- 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
hir::ImplItem
- Reflects
hir::Item
(andhir::ItemId
) - Reflects
ty::LateParamRegion
- Reflects
rustc_span::Loc
- Reflects
thir::LocalVarId
- Reflects
ast::MacroDef
- Describe a macro invocation, using
macro_invocation_of_raw_mac_invocation
- Reflects
rustc_ast::ast::MetaItemLit
- Reflects
rustc_ast::ast::NormalAttr
- Reflects
hir::OpaqueTy
- Reflects
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
thir::Param
- Reflects
ty::ParamConst
- Reflects
ty::ParamTy
- Reflects
thir::PatRange
- An owned, mutable path (akin to
String
). - Reflects
hir::PathSegment
- Reflects
ty::Placeholder
- Reflects
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. - Stores a set of predicates along with where they came from.
- Expresses a constraints over an associated type.
- A single-threaded reference-counting pointer. ‘Rc’ stands for ‘Reference Counted’.
- Reflects
ty::Region
- Reflects
ty::ReprOptions
- Reflects
rustc_middle::mir::BinOp
- Reflects
rustc_span::Span
- Reflects
rustc_span::source_map::Spanned
- Reflects
thir::Stmt
- Reflects
ty::SubtypePredicate
- Reflects
hir::TraitItem
- Reflects
ty::TraitPredicate
- Reflects
ty::TraitRef
- Reflects
rustc_middle::ty::Ty
- Reflects
ty::FnSig
- Reflects
ty::Generics
- Reflects
ty::TypeAndMut
- A map that maps types to values in a generic manner: we store for each type
T
a value of typeM::Value<T>
. - Reflects
hir::UsePath
- Reflects
ty::UserArgs
- Reflects
ty::UserSelfTy
- Reflects
hir::Variant
- Reflects
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_target::spec::abi::Abi
- Reflects
ty::AdtKind
- Reflects [
ty::AliasKind
] - Reflects
ty::AliasRelationDirection
- Reflects
hir::AssocItemKind
- Reflects
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
thir::BlockSafety
- Reflects
rustc_middle::mir::BorrowKind
- Reflects
ty::BoundRegionKind
- Reflects
ty::BoundTyKind
- Reflects
ty::BoundVariableKind
- Reflects
rustc_ast::ast::ByRef
- Reflects
ty::ClauseKind
- Reflects
ty::ClosureKind
- Reflects
rustc_ast::token::CommentKind
- Reflects
hir::ConstArgKind
- The subset of Expr that corresponds to constants.
- Reflects
hir::Constness
- Reflects
hir::def::CtorKind
- Reflects
hir::def::CtorOf
- Reflects
rustc_hir::def::DefKind
- Reflects
rustc_hir::definitions::DefPathData
- Reflects
hir::Defaultness
- Reflects
rustc_ast::token::Delimiter
- Reflects
rustc_span::hygiene::DesugaringKind
- Reflects
ty::VariantDiscr
- Reflects
ty::DynKind
- Reflects
rustc_span::edition::Edition
- A predicate without
Self
, for use indyn Trait
. - Reflects
rustc_span::hygiene::ExpnKind
- Reflects
thir::ExprKind
- Reflects
rustc_middle::mir::FakeBorrowKind
- Reflects
rustc_span::FileName
- Reflects
rustc_type_ir::FloatTy
- Reflects
hir::FnRetTy
- Reflects
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
ty::GenericArg
andty::GenericArgKind
- Reflects
ty::GenericParamDefKind
- Reflects
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
hir::ImplItemKind
, inlining the body of the items. - Reflects
hir::ImplPolarity
- Reflects
ty::ImplTraitInTraitData
- Reflects
hir::ImplicitSelfKind
- Reflects partially
ty::InferTy
- Reflects
rustc_attr::InlineAttr
- Reflects
rustc_type_ir::IntTy
- Reflects
hir::IsAsync
- Reflects
hir::IsAuto
- Reflects
hir::ItemKind
- Reflects
hir::LifetimeParamKind
- Reflects
thir::LintLevel
- Reflects
ast::LitFloatType
- Reflects both
ty::GenericArg
andty::GenericArgKind
- Reflects
rustc_ast::ast::LitKind
- Reflects
thir::LogicalOp
- Reflects
rustc_span::hygiene::MacroKind
- Reflects
hir::Movability
- Reflects
rustc_middle::mir::MutBorrowKind
- Reflects
hir::def::NonMacroAttrKind
- Reflects
hir::OpaqueTyOrigin
- Reflects
hir::ParamName
- Reflects
thir::PatKind
- Reflects
thir::PatRangeBoundary
- Reflects
ty::adjustment::PointerCoercion
- Reflects
ty::PredicateKind
- Reflects
hir::PrimTy
- Reflects
hir::RangeEnd
- Reflects
rustc_span::RealFileName
- Reflects
ty::RegionKind
- Reflects
hir::def::Res
- Reflects
hir::Safety
- Reflects [
rustc_middle::mir::ScopeData
] - Reflects
thir::StmtKind
- Reflects
rustc_ast::ast::StrStyle
- Reflects
ty::Term
- Reflects
hir::TraitItemKind
- Reflects
ty::TyKind
- Reflects
rustc_type_ir::UintTy
- Reflects
rustc_middle::mir::UnOp
- Reflects
hir::UseKind
- Reflects
ty::UserType
: this is currently disabled, and everything is printed as debug in theUserType::Todo
variant. - Reflects
ty::Variance
- Reflects
hir::VariantData
- Describe the kind of a variant
- Reflects
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.
- Defines a mapping from types to types.
Functions§
- Gets the closest ancestor of
id
that is the id of a type. - Gets the kind of the definition.
- Gets the attributes of the definition.
- The predicates that can be deduced from the presence of this item in a signature. We only consider predicates implied by traits here, not implied bounds such as
&'a T
implyingT: 'a
. - Returns a list of type predicates for the definition with ID
def_id
, including inferred lifetime constraints. This is the basic list of predicates we use for essentially all items. - The predicates that must hold to mention this item.
- Retrieve the
Self: Trait
clause for a trait associated item. - The special “self” predicate on a trait.
- Solve the trait obligations for implementing a trait (or for trait associated type bounds) in the current context.
- Solve the trait obligations for a specific item use (for example, a method call, an ADT, etc.) in the current context.
- This is the entrypoint of the solving.
- 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
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
ty::PlaceholderConst
- Reflects
ty::PlaceholderRegion
- Reflects
ty::PlaceholderType
- Reflects
ty::PolyFnSig
- Reflects
ty::RegionOutlivesPredicate
- 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
. - Reflects
ty::TypeOutlivesPredicate