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
'staticescapes.
Structsยง
- Signature
Info ๐
Enumsยง
- Alive
Producer ๐ - Return
Lifetime ๐
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
Aliveobligation 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.