Module translate_ctx

Source
Expand description

The translation contexts.

MacrosΒ§

error_assert πŸ”’
Custom assert to either panic or return an error
raise_error πŸ”’
Macro to either panic or return on error, depending on the CLI options
register_error πŸ”’

StructsΒ§

BindingLevel πŸ”’
A level of binding for type-level variables. Each item has a top-level binding level corresponding to the parameters and clauses to the items. We may then encounter inner binding levels in the following cases:
DepSource πŸ”’
We use this to save the origin of an id. This is useful for the external dependencies, especially if some external dependencies don’t extract: we use this information to tell the user what is the code which (transitively) lead to the extraction of those problematic dependencies.
ErrorCtx πŸ”’
The context for tracking and reporting errors.
ItemTransCtx πŸ”’
A translation context for items. Augments the TranslateCtx with type-level variables.
Level πŸ”’
[Message] or [Title] severity level
TranslateCtx
Translation context used while translating the crate data into our representation.

EnumsΒ§

TransItemSource
The id of an untranslated item. Note that a given DefId may show up as multiple different item sources, e.g. a constant will have both a Global version (for the constant itself) and a FunDecl one (for its initializer function).

FunctionsΒ§

catch_sinto
Translates T into U using hax’s SInto trait, catching any hax panics.