pub trait Pass {
type Input;
type Output;
const NAME: &str;
// Required method
fn do_pass(
input: Self::Input,
state: &mut CompilerState,
) -> Result<Self::Output>;
}
Expand description
A compiler pass.
Every pass has access to CompilerState
, and may also specify
an Input
and Output
.
Required Associated Constants§
Required Associated Types§
Required Methods§
Sourcefn do_pass(
input: Self::Input,
state: &mut CompilerState,
) -> Result<Self::Output>
fn do_pass( input: Self::Input, state: &mut CompilerState, ) -> Result<Self::Output>
Runs the compiler pass.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.