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