Trait Callbacks
pub trait Callbacks {
// Provided methods
fn config(&mut self, _config: &mut Config) { ... }
fn after_crate_root_parsing(
&mut self,
_compiler: &Compiler,
_krate: &mut Crate,
) -> Compilation { ... }
fn after_expansion<'tcx>(
&mut self,
_compiler: &Compiler,
_tcx: TyCtxt<'tcx>,
) -> Compilation { ... }
fn after_analysis<'tcx>(
&mut self,
_compiler: &Compiler,
_tcx: TyCtxt<'tcx>,
) -> Compilation { ... }
}Provided Methods§
fn config(&mut self, _config: &mut Config)
fn config(&mut self, _config: &mut Config)
Called before creating the compiler instance
fn after_crate_root_parsing(
&mut self,
_compiler: &Compiler,
_krate: &mut Crate,
) -> Compilation
fn after_crate_root_parsing( &mut self, _compiler: &Compiler, _krate: &mut Crate, ) -> Compilation
Called after parsing the crate root. Submodules are not yet parsed when
this callback is called. Return value instructs the compiler whether to
continue the compilation afterwards (defaults to Compilation::Continue)
fn after_expansion<'tcx>(
&mut self,
_compiler: &Compiler,
_tcx: TyCtxt<'tcx>,
) -> Compilation
fn after_expansion<'tcx>( &mut self, _compiler: &Compiler, _tcx: TyCtxt<'tcx>, ) -> Compilation
Called after expansion. Return value instructs the compiler whether to
continue the compilation afterwards (defaults to Compilation::Continue)
fn after_analysis<'tcx>(
&mut self,
_compiler: &Compiler,
_tcx: TyCtxt<'tcx>,
) -> Compilation
fn after_analysis<'tcx>( &mut self, _compiler: &Compiler, _tcx: TyCtxt<'tcx>, ) -> Compilation
Called after analysis. Return value instructs the compiler whether to
continue the compilation afterwards (defaults to Compilation::Continue)