2 // Test that the Callbacks interface to the compiler works.
4 // ignore-cross-compile
7 #![feature(rustc_private)]
9 extern crate rustc_driver;
10 extern crate rustc_interface;
12 use rustc_interface::interface;
14 struct TestCalls<'a> {
18 impl rustc_driver::Callbacks for TestCalls<'_> {
19 fn config(&mut self, _config: &mut interface::Config) {
26 let args = vec!["compiler-calls".to_string(), "foo.rs".to_string()];
27 rustc_driver::report_ices_to_stderr_if_any(|| {
28 rustc_driver::run_compiler(&args, &mut TestCalls { count: &mut count }, None, None).ok();