From 601e04534f4f8117f4d121bdd9bfb5ed100c72e6 Mon Sep 17 00:00:00 2001 From: Kamal Marhubi Date: Mon, 8 Feb 2016 14:55:38 -0500 Subject: Add compile-fail test for invalid cfg predicate in attribute Refs #31495 --- src/test/compile-fail/cfg-attr-invalid-predicate.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 src/test/compile-fail/cfg-attr-invalid-predicate.rs 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 or the MIT license +// , 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() {} -- cgit 1.4.1-3-g733a5