Skip to content

Commit 469753f

Browse files
committed
Fix fallout in tests.
1 parent bfb01bb commit 469753f

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

src/librustc/session/config.rs

+6-2
Original file line numberDiff line numberDiff line change
@@ -1772,7 +1772,9 @@ mod tests {
17721772
use std::path::PathBuf;
17731773
use std::rc::Rc;
17741774
use super::{OutputType, OutputTypes, Externs, PanicStrategy};
1775-
use syntax::attr;
1775+
use syntax::{ast, attr};
1776+
use syntax::parse::token::InternedString;
1777+
use syntax::codemap::dummy_spanned;
17761778

17771779
fn optgroups() -> Vec<OptGroup> {
17781780
super::rustc_optgroups().into_iter()
@@ -1801,7 +1803,9 @@ mod tests {
18011803
let (sessopts, cfg) = build_session_options_and_crate_config(matches);
18021804
let sess = build_session(sessopts, &dep_graph, None, registry, Rc::new(DummyCrateStore));
18031805
let cfg = build_configuration(&sess, cfg);
1804-
assert!((attr::contains_name(&cfg[..], "test")));
1806+
assert!(attr::contains(&cfg, &dummy_spanned(ast::MetaItemKind::Word({
1807+
InternedString::new("test")
1808+
}))));
18051809
}
18061810

18071811
// When the user supplies --test and --cfg test, don't implicitly add

src/test/compile-fail-fulldeps/auxiliary/macro_crate_test.rs

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ extern crate rustc;
1818
extern crate rustc_plugin;
1919

2020
use syntax::ast::{self, Item, MetaItem, ItemKind};
21-
use syntax::attr::{AttrMetaMethods, AttrNestedMetaItemMethods};
2221
use syntax::ext::base::*;
2322
use syntax::parse::{self, token};
2423
use syntax::ptr::P;

src/test/run-pass-fulldeps/auxiliary/custom_derive_plugin_attr.rs

-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ extern crate rustc;
2121
extern crate rustc_plugin;
2222

2323
use syntax::ast;
24-
use syntax::attr::AttrMetaMethods;
2524
use syntax::ext::base::{MultiDecorator, ExtCtxt, Annotatable};
2625
use syntax::ext::build::AstBuilder;
2726
use syntax::parse::token;

src/test/run-pass-fulldeps/auxiliary/macro_crate_test.rs

-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ extern crate syntax_pos;
1919

2020
use syntax::ast::{self, Item, MetaItem, ItemKind};
2121
use syntax::codemap::DUMMY_SP;
22-
use syntax::attr::{AttrMetaMethods, AttrNestedMetaItemMethods};
2322
use syntax::ext::base::*;
2423
use syntax::ext::quote::rt::ToTokens;
2524
use syntax::parse::{self, token};

0 commit comments

Comments
 (0)