Skip to main content

FunctionScope

Trait FunctionScope 

Source
pub trait FunctionScope {
    // Required method
    fn enter_function<'a>(
        &mut self,
        name: &str,
        labels: impl IntoIterator<Item = (&'a str, usize)>,
    ) -> Result<()>;
}
Expand description

Prepare a function’s local symbols before lowering any of its instructions.

Consumers with additional lowering capabilities can implement this trait on their own context and delegate to MetadataLoweringContext. Label offsets count instructions within the function; declarations occupy no code slots.

Required Methods§

Source

fn enter_function<'a>( &mut self, name: &str, labels: impl IntoIterator<Item = (&'a str, usize)>, ) -> Result<()>

Replace the active function’s labels, including forward references.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§