Add comment
This commit is contained in:
parent
4e0ee758b7
commit
cc5c1a0abb
@ -414,6 +414,18 @@ impl<'a> CompileController<'a> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// This implementation makes it easier to create a custom driver when you only want to hook
|
||||||
|
/// into callbacks from `CompileController`.
|
||||||
|
///
|
||||||
|
/// # Example
|
||||||
|
///
|
||||||
|
/// ```no_run
|
||||||
|
/// # extern crate rustc_driver;
|
||||||
|
/// # use rustc_driver::driver::CompileController;
|
||||||
|
/// let mut controller = CompileController::basic();
|
||||||
|
/// controller.after_analysis.callback = Box::new(move |_state| {});
|
||||||
|
/// rustc_driver::run_compiler(&[], Box::new(controller), None, None);
|
||||||
|
/// ```
|
||||||
impl<'a> ::CompilerCalls<'a> for CompileController<'a> {
|
impl<'a> ::CompilerCalls<'a> for CompileController<'a> {
|
||||||
fn early_callback(
|
fn early_callback(
|
||||||
&mut self,
|
&mut self,
|
||||||
|
Loading…
Reference in New Issue
Block a user