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§
- VmAlias
Result - Result of the VM-based alias check.
- VmOrigin
Kind
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 (
&Tor&[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).