Fix fallout in tests.

This commit is contained in:
Jeffrey Seyfried 2016-08-24 23:59:18 +00:00
parent bfb01bbb26
commit 469753f0ab
4 changed files with 6 additions and 5 deletions

View File

@ -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<OptGroup> {
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

View File

@ -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;

View File

@ -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;

View File

@ -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};