about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorKamal Marhubi <kamal@marhubi.com>2016-02-08 14:55:38 -0500
committerKamal Marhubi <kamal@marhubi.com>2016-02-08 17:15:24 -0500
commit601e04534f4f8117f4d121bdd9bfb5ed100c72e6 (patch)
tree1f32882b1f125b29e0a3c7c50c95d1bddcb31cd9 /src/test
parent26105b1a3765a73bab44fb18ccbd5a4635018fdf (diff)
downloadrust-601e04534f4f8117f4d121bdd9bfb5ed100c72e6.tar.gz
rust-601e04534f4f8117f4d121bdd9bfb5ed100c72e6.zip
Add compile-fail test for invalid cfg predicate in attribute
Refs #31495
Diffstat (limited to 'src/test')
-rw-r--r--src/test/compile-fail/cfg-attr-invalid-predicate.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/test/compile-fail/cfg-attr-invalid-predicate.rs b/src/test/compile-fail/cfg-attr-invalid-predicate.rs
new file mode 100644
index 00000000000..09fe6cec49c
--- /dev/null
+++ b/src/test/compile-fail/cfg-attr-invalid-predicate.rs
@@ -0,0 +1,12 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#[cfg(foo(bar))] //~ ERROR invalid predicate `foo`
+fn main() {}