Skip to main content

## ACTIVE_RESOLUTIONS

# Constant ACTIVE_RESOLUTIONS

Source

    const ACTIVE_RESOLUTIONS: LocalKey<RefCell<Vec<*const ()>>>;

Expand description

During import resolution, recursive imports can form cycles. This set stores the active resolution stack for the current thread. So it’s essentially a recursion stack.

The key is the interned address of a `RefCell<NameResolution<'ra>>` allocated in the `Resolver Arenas` (lifetime `'ra`), it is thus stable and allows casting to a `*const ()` for comparison. This is done because we can’t use lifetimes other than `'static` in thread local storage.