pub enum Policy {
FrameScope,
RequestScope,
}Expand description
Scope policy for the escape analysis. Only Op::Return consults
it — every other escape rule is identical across policies.
FrameScope(default for #464 stack-record lowering):Returnleaks its operand, because the returned value crosses the current function’s frame into the caller.RequestScope(for #463 arena routing):Returndoes NOT leak its operand — the value goes to the caller’s stack and the caller is in the same request scope opened byEffectHandler::enter_request_scope. What the caller does with the returned value is an inter-procedural question, deliberately left to the caller’s own conservativeCallarm (which marks its args as escaping in the intra-procedural first cut). Seedocs/design/arena-plumbing.md.
Variants§
Trait Implementations§
impl Copy for Policy
impl Eq for Policy
impl StructuralPartialEq for Policy
Auto Trait Implementations§
impl Freeze for Policy
impl RefUnwindSafe for Policy
impl Send for Policy
impl Sync for Policy
impl Unpin for Policy
impl UnsafeUnpin for Policy
impl UnwindSafe for Policy
Blanket Implementations§
impl<T> Allocation for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.