HasStaticRootDefId in rustc_const_eval::interpret::intern - Rust
Description: API documentation for the Rust `HasStaticRootDefId` trait in crate `rustc_const_eval`.

Skip to main content

## HasStaticRootDefId

# Trait HasStaticRootDefId

Source

    pub trait HasStaticRootDefId {
        // Required method
        fn static_def_id(&self) -> Option<LocalDefId>;
    }

## Required Methods§

Source

#### fn static_def_id(&self) -> Option<LocalDefId>

Returns the `DefId` of the static item that is currently being evaluated. Used for interning to be able to handle nested allocations.

## Implementors§

Source§

### impl HasStaticRootDefId for CompileTimeMachine<'_>

Source§

### impl HasStaticRootDefId for DummyMachine