X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Flibrustc_interface%2Ftests.rs;h=1b80cf4e3dbc2d7ed15c65a20bf75a19c8dafa5e;hb=d4860fcff30b377fdfe8c7427cd904ad396d44a3;hp=ec75a1c6a3938d92df5d95ee847cf19270997473;hpb=ac8acd856e6f376183a4a6ed2bc9bb0fd6f63b32;p=rust.git diff --git a/src/librustc_interface/tests.rs b/src/librustc_interface/tests.rs index ec75a1c6a39..1b80cf4e3db 100644 --- a/src/librustc_interface/tests.rs +++ b/src/librustc_interface/tests.rs @@ -18,7 +18,6 @@ use std::collections::{BTreeMap, BTreeSet}; use std::iter::FromIterator; use std::path::PathBuf; -use syntax; type CfgSpecs = FxHashSet<(String, Option)>; @@ -64,7 +63,7 @@ fn mk_map(entries: Vec<(K, V)>) -> BTreeMap { // When the user supplies --test we should implicitly supply --cfg test #[test] fn test_switch_implies_cfg_test() { - syntax::with_default_globals(|| { + rustc_ast::with_default_globals(|| { let matches = optgroups().parse(&["--test".to_string()]).unwrap(); let (sess, cfg) = mk_session(matches); let cfg = build_configuration(&sess, to_crate_config(cfg)); @@ -75,7 +74,7 @@ fn test_switch_implies_cfg_test() { // When the user supplies --test and --cfg test, don't implicitly add another --cfg test #[test] fn test_switch_implies_cfg_test_unless_cfg_test() { - syntax::with_default_globals(|| { + rustc_ast::with_default_globals(|| { let matches = optgroups().parse(&["--test".to_string(), "--cfg=test".to_string()]).unwrap(); let (sess, cfg) = mk_session(matches); let cfg = build_configuration(&sess, to_crate_config(cfg)); @@ -87,20 +86,20 @@ fn test_switch_implies_cfg_test_unless_cfg_test() { #[test] fn test_can_print_warnings() { - syntax::with_default_globals(|| { + rustc_ast::with_default_globals(|| { let matches = optgroups().parse(&["-Awarnings".to_string()]).unwrap(); let (sess, _) = mk_session(matches); assert!(!sess.diagnostic().can_emit_warnings()); }); - syntax::with_default_globals(|| { + rustc_ast::with_default_globals(|| { let matches = optgroups().parse(&["-Awarnings".to_string(), "-Dwarnings".to_string()]).unwrap(); let (sess, _) = mk_session(matches); assert!(sess.diagnostic().can_emit_warnings()); }); - syntax::with_default_globals(|| { + rustc_ast::with_default_globals(|| { let matches = optgroups().parse(&["-Adead_code".to_string()]).unwrap(); let (sess, _) = mk_session(matches); assert!(sess.diagnostic().can_emit_warnings());