/// Returns a ptr if the condemned ptr has already been evacuated.
Returns a ptr if the condemned ptr has already been evacuated.
Returns a ptr if the condemned ptr has already been evacuated .
unsafe fn forward<T: Trace>(condemned: *const T, new: *const T) -> *const T {
        let header = &mut *(Header::from(condemned) as *mut Header<T>);
        // This will race if multiple threads are tracing!
        let mut evacuated = header.intern.evacuated.lock().unwrap();
        // Add a forwarding ptr to the condemned Arena
        *evacuated
            .entry(Arena::index(condemned))
            .or_insert(new as *const u8) as *const T
    }
unsafe fn forward < T : Trace > ( condemned : * const T , new : * const T ) -> * const T { let header = & mut * ( Header :: from ( condemned ) as * mut Header < T > ) ; // This will race if multiple threads are tracing! let mut evacuated = header . intern . evacuated . lock ( ) . unwrap ( ) ; // Add a forwarding ptr to the condemned Arena * evacuated . entry ( Arena :: index ( condemned ) ) . or_insert ( new as * const u8 ) as * const T }
Returns a ptr if the condemned ptr has already been evacuated.
Returns a ptr if the condemned ptr has already been evacuated .
condemned
*const T
new
*const T