Module fhir

Source
Expand description

Flux High-Level Intermediate Representation

The fhir corresponds to the desugared version of source level flux annotations. The main difference with the surface syntax is that the list of refinement parameters is explicit in fhir. For example, the following signature

fn(x: &strg i32[@n]) ensures x: i32[n + 1]

desugars to

for<n: int, l: loc> fn(&strg<l: i32[n]>) ensures l: i32[n + 1].

The name fhir is borrowed (pun intended) from rustc’s hir to refer to something a bit lower than the surface syntax.

Modules§

visit

Structs§

AliasReft
<qself as path>::name
AssocItemConstraint
BareFnTy
BaseTy
These are types of things that may be refined with indices or existentials
ConstArg
EnumDef
Expr
FhirId
A unique identifier for a node in the AST. Like HirId it is composed of an owner and a local_id. We don’t generate ids for all nodes, but only for those we need to remember information elaborated during well-formedness checking to later be used during conversion into rty.
FieldDef
FieldExpr
FluxItems
A map between rust definitions and flux annotations in their desugared fhir form.
FnDecl
FnOutput
FnSig
ForeignItem
FuncSort
GenericParam
Generics
Impl
ImplAssocReft
ImplItem
Item
ItemLocalId
An ItemLocalId uniquely identifies something within a given “item-like”.
LetDecl
MutTy
OpaqueTy
ParamId
PartialRes
See [rustc_hir::def::PartialRes]
Path
PathExpr
PathSegment
PolyFuncSort
PolyTraitRef
Qualifier
Range
RefineParam
RefinedBy
Information about the refinement parameters associated with an adt (struct/enum).
Requires
A predicate required to hold before calling a function.
SortDecl
SortPath
See flux_syntax::surface::SortPath
SpecFunc
Spread
StructDef
Trait
TraitAssocReft
TraitItem
Ty
TyAlias
VariantDef
VariantRet
WhereBoundPredicate
VariantIdx
The source-order index of a variant in a type.

Enums§

AssocItemConstraintKind
BaseTyKind
BinOp
ConstArgKind
Ensures
ExprKind
ExprRes
FluxItem
FluxOwnerId
Owner version of FluxLocalDefId
ForeignItemKind
GenericArg
GenericBound
GenericParamKind
Ignored
A boolean-like enum used to mark whether a piece of code is ignored.
ImplItemKind
InferMode
Inference mode for a parameter.
ItemKind
Lifetime
Our surface syntax doesn’t have lifetimes. To deal with them we create a hole for every lifetime which we then resolve when we check for structural compatibility against the rust type.
Lit
Node
OwnerNode
ParamKind
How a parameter was declared in the surface syntax.
PrimSort
QPath
QuantKind
RefinementKind
Res
Sort
SortRes
SpecFuncKind
StructKind
TraitBoundModifier
TraitItemKind
Trusted
A boolean-like enum used to mark whether some code should be trusted.
TyKind
UnOp
Mutability
PrimTy
Not represented directly in the AST; referred to by name through a ty_path.

Type Aliases§

Arena
GenericBounds
SortDecls