diff options
| author | Steven Fackler <sfackler@gmail.com> | 2014-08-03 17:41:58 -0700 |
|---|---|---|
| committer | Steven Fackler <sfackler@gmail.com> | 2014-09-23 23:49:20 -0700 |
| commit | 65cca7c8b14e9c5673af4921a57c2ccbac3fc2cb (patch) | |
| tree | 2a693f86b51ea3725368b408efcc25d83041b9bd /src/libsyntax | |
| parent | e520bb1b2f1667f17c3503af71273921c4fc9989 (diff) | |
| download | rust-65cca7c8b14e9c5673af4921a57c2ccbac3fc2cb.tar.gz rust-65cca7c8b14e9c5673af4921a57c2ccbac3fc2cb.zip | |
Deprecate `#[ignore(cfg(...))]`
Replace `#[ignore(cfg(a, b))]` with `#[cfg_attr(all(a, b), ignore)]`
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/test.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libsyntax/test.rs b/src/libsyntax/test.rs index f0e69712714..b6e3023d2ae 100644 --- a/src/libsyntax/test.rs +++ b/src/libsyntax/test.rs @@ -339,6 +339,12 @@ fn is_ignored(cx: &TestCtxt, i: &ast::Item) -> bool { // check ignore(cfg(foo, bar)) attr.check_name("ignore") && match attr.meta_item_list() { Some(ref cfgs) => { + if cfgs.iter().any(|cfg| cfg.check_name("cfg")) { + cx.sess.span_warn(attr.span, + "The use of cfg filters in #[ignore] is \ + deprecated. Use #[cfg_attr(<cfg pattern>, \ + ignore)] instead."); + } attr::test_cfg(cx.config.as_slice(), cfgs.iter()) } None => true |
