Move with_globals setup from run_compiler to run

This commit is contained in:
John Kåre Alsaker 2018-08-23 05:05:37 +02:00
parent 7219130677
commit bd04796d6e
2 changed files with 31 additions and 29 deletions

View file

@ -92,7 +92,9 @@ fn main() {
let tc = TestCalls { count: &mut count };
// we should never get use this filename, but lets make sure they are valid args.
let args = vec!["compiler-calls".to_string(), "foo.rs".to_string()];
rustc_driver::run_compiler(&args, Box::new(tc), None, None);
syntax::with_globals(|| {
rustc_driver::run_compiler(&args, Box::new(tc), None, None);
});
}
assert_eq!(count, 30);
}