pub trait FunctionScope {
// Required method
fn enter_function<'a>(
&mut self,
name: &str,
labels: impl IntoIterator<Item = (&'a str, usize)>,
) -> Result<(), Report>;
}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§
Sourcefn enter_function<'a>(
&mut self,
name: &str,
labels: impl IntoIterator<Item = (&'a str, usize)>,
) -> Result<(), Report>
fn enter_function<'a>( &mut self, name: &str, labels: impl IntoIterator<Item = (&'a str, usize)>, ) -> Result<(), Report>
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".