diff --git a/src/librustc/session/config.rs b/src/librustc/session/config.rs index 7a1848f42d2..562dce6a1b1 100644 --- a/src/librustc/session/config.rs +++ b/src/librustc/session/config.rs @@ -1772,7 +1772,9 @@ mod tests { use std::path::PathBuf; use std::rc::Rc; use super::{OutputType, OutputTypes, Externs, PanicStrategy}; - use syntax::attr; + use syntax::{ast, attr}; + use syntax::parse::token::InternedString; + use syntax::codemap::dummy_spanned; fn optgroups() -> Vec { super::rustc_optgroups().into_iter() @@ -1801,7 +1803,9 @@ mod tests { let (sessopts, cfg) = build_session_options_and_crate_config(matches); let sess = build_session(sessopts, &dep_graph, None, registry, Rc::new(DummyCrateStore)); let cfg = build_configuration(&sess, cfg); - assert!((attr::contains_name(&cfg[..], "test"))); + assert!(attr::contains(&cfg, &dummy_spanned(ast::MetaItemKind::Word({ + InternedString::new("test") + })))); } // When the user supplies --test and --cfg test, don't implicitly add diff --git a/src/test/compile-fail-fulldeps/auxiliary/macro_crate_test.rs b/src/test/compile-fail-fulldeps/auxiliary/macro_crate_test.rs index 6db10eeae76..5a3412b7ed9 100644 --- a/src/test/compile-fail-fulldeps/auxiliary/macro_crate_test.rs +++ b/src/test/compile-fail-fulldeps/auxiliary/macro_crate_test.rs @@ -18,7 +18,6 @@ extern crate rustc; extern crate rustc_plugin; use syntax::ast::{self, Item, MetaItem, ItemKind}; -use syntax::attr::{AttrMetaMethods, AttrNestedMetaItemMethods}; use syntax::ext::base::*; use syntax::parse::{self, token}; use syntax::ptr::P; diff --git a/src/test/run-pass-fulldeps/auxiliary/custom_derive_plugin_attr.rs b/src/test/run-pass-fulldeps/auxiliary/custom_derive_plugin_attr.rs index 882e90b2d6c..91b4b74797a 100644 --- a/src/test/run-pass-fulldeps/auxiliary/custom_derive_plugin_attr.rs +++ b/src/test/run-pass-fulldeps/auxiliary/custom_derive_plugin_attr.rs @@ -21,7 +21,6 @@ extern crate rustc; extern crate rustc_plugin; use syntax::ast; -use syntax::attr::AttrMetaMethods; use syntax::ext::base::{MultiDecorator, ExtCtxt, Annotatable}; use syntax::ext::build::AstBuilder; use syntax::parse::token; diff --git a/src/test/run-pass-fulldeps/auxiliary/macro_crate_test.rs b/src/test/run-pass-fulldeps/auxiliary/macro_crate_test.rs index e37cd89f299..46fdf911258 100644 --- a/src/test/run-pass-fulldeps/auxiliary/macro_crate_test.rs +++ b/src/test/run-pass-fulldeps/auxiliary/macro_crate_test.rs @@ -19,7 +19,6 @@ extern crate syntax_pos; use syntax::ast::{self, Item, MetaItem, ItemKind}; use syntax::codemap::DUMMY_SP; -use syntax::attr::{AttrMetaMethods, AttrNestedMetaItemMethods}; use syntax::ext::base::*; use syntax::ext::quote::rt::ToTokens; use syntax::parse::{self, token};