Module alive

Module alive 

Source
Expand description

Lifetime anchoring checks for the Alive safety property.

Alive is different from numeric SPs: from_raw_parts(_mut) does not only require a valid address at the callsite, it also asks the returned viewโ€™s lifetime to be anchored to a source that really owns or borrows the memory. This first checker intentionally focuses on common safe-wrapper shapes:

  • elided returns tied to &self / &mut self;
  • explicit returns tied to a real host parameter used to produce the pointer;
  • obvious lifetime widening, unrelated host, and 'static escapes.

Structsยง

SignatureInfo ๐Ÿ”’

Enumsยง

AliveProducer ๐Ÿ”’
ReturnLifetime ๐Ÿ”’

Functionsยง

alive_producer_from_destination ๐Ÿ”’
Classifies the borrowed view returned by the Alive-producing call destination.
call_destination ๐Ÿ”’
Returns the destination local of the Alive-producing callsite.
call_pointer_origin_param ๐Ÿ”’
Recovers pointer provenance from interprocedural call effects.
call_result_for_local ๐Ÿ”’
Finds the retained call summary that produced a given local.
check ๐Ÿ”’
Checks whether an Alive obligation has a lifetime anchor for the returned view.
check_elided_return ๐Ÿ”’
Checks whether an elided return lifetime can be tied to the receiver borrow.
check_named_return ๐Ÿ”’
Checks whether an explicit return lifetime is tied to the pointer source.
destination_flows_to_return ๐Ÿ”’
Checks whether the call destination may escape through the function return.
failed ๐Ÿ”’
Builds a failed SMT check result with a single diagnostic note.
function_signature_text ๐Ÿ”’
Extracts a compact source-level function signature from the HIR span.
params_segment ๐Ÿ”’
Extracts the comma-separated parameter segment from a compact signature.
params_with_lifetime ๐Ÿ”’
Finds MIR argument locals whose source signature type carries the target lifetime.
pointer_origin_param_local ๐Ÿ”’
Finds the caller argument local that originally produced a pointer place.
pointer_origin_param_local_inner ๐Ÿ”’
Recursively follows local values and call summaries to recover pointer provenance.
return_lifetime ๐Ÿ”’
Parses the return lifetime shape from a compact signature.
rvalue_source_local ๐Ÿ”’
Extracts the source local from simple copy, move, cast, or deref-copy rvalues.
value_pointer_origin_param ๐Ÿ”’
Recovers pointer provenance from an abstract value.