Skip to main content

Module alias

Module alias 

Source
Expand description

VM-specific alias origin tracing.

Bridges VmState provenance tracking with the shared alias_hazard MIR scanning infrastructure. The VM already tracks which AllocId each local’s value points to; this module traces that provenance back to the originating parameter/local.

Structs§

VmOrigin
Information about a value’s ultimate origin.

Enums§

VmAliasResult
Result of the VM-based alias check.
VmOriginKind

Functions§

check_alias_vm
Run the full alias hazard check for the VM backend.
check_ownership_transfer_alias 🔒
check_read_memory_alias 🔒
check_view_alias 🔒
find_struct_field_origin_for_param 🔒
Attempt to extract the MIR local index from an operand for PlaceKey construction. Try to find a struct field origin by examining checkpoint arguments and the function’s self type. Handles the case where origin tracing fails to resolve through intermediate locals.
infer_self_field_from_type 🔒
When origin tracing fails to resolve the exact struct field, try to infer it from the function’s self type. Looks for a raw pointer field in the struct — for simple wrappers with a single raw pointer field, this works reliably.
is_self_field_shared_ref 🔒
Check whether a self field’s type is a shared reference (&T or &[T]). Used by raw-ptr-deref alias checks to prove shared views are safe when the underlying field is a shared reference.
resolve_origin_place_mir 🔒
copies/casts (e.g. _tmp = self.ptr_1.0).