Expand description
This module provides a list of handy DefId for the engine.
The list of DefIds comes from the crate /engine/names: any name mentionned
in that crate will be provided here automatically.
For example, to be able to resugar std::ops::Add::add(x, y) into x + y,
we need to:
- match on the expression
std::ops::Add::add(x, y), figure out it is the application of the function denoted by the global identifierstd::ops::Add::addwith argumentsxandy. - check that global identifier
id: GlobalIdstd::ops::Add::addis indeedstd::ops::Add::add.
Point (2.) seems a bit tautological, but we need to write a comparison like
some_id == the_function_add. This module basically provides such
the_function_add symbols.
As an example, the names std::option::Option::Some and None will be provided by this module as:
ⓘ
mod std {
mod option {
mod Option {
fn Some() -> DefId { ... }
fn None() -> DefId { ... }
}
}
}Modules§
- alloc
- This is the module [
::alloc]. - codegen
- Global identifiers are built around
DefIdthat comes out of the hax frontend. We use the Rust engine itself to produce the names: we run hax on theengine/namescrate, we extract identifiers from the resulting AST, and we expose them back as Rust functions here. - core
- This is the module
::core. - hax_lib
- This is the module [
::hax_lib]. - hax_
lib_ protocol - This is the module [
::hax_lib_protocol]. - rust_
primitives - This is the module [
::rust_primitives].
Constants§
- alloc
- This is the module [
::alloc]. - core
- This is the module
::core. - hax_lib
- This is the module [
::hax_lib]. - hax_
lib_ protocol - This is the module [
::hax_lib_protocol]. - rust_
primitives - This is the module [
::rust_primitives].