We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4e0ee75 commit cc5c1a0Copy full SHA for cc5c1a0
src/librustc_driver/driver.rs
@@ -414,6 +414,18 @@ impl<'a> CompileController<'a> {
414
}
415
416
417
+/// This implementation makes it easier to create a custom driver when you only want to hook
418
+/// into callbacks from `CompileController`.
419
+///
420
+/// # Example
421
422
+/// ```no_run
423
+/// # extern crate rustc_driver;
424
+/// # use rustc_driver::driver::CompileController;
425
+/// let mut controller = CompileController::basic();
426
+/// controller.after_analysis.callback = Box::new(move |_state| {});
427
+/// rustc_driver::run_compiler(&[], Box::new(controller), None, None);
428
+/// ```
429
impl<'a> ::CompilerCalls<'a> for CompileController<'a> {
430
fn early_callback(
431
&mut self,
0 commit comments