From 3636ce7875dc71d907789a779c1c1cb5973e021f Mon Sep 17 00:00:00 2001 From: Jeffrey Seyfried Date: Wed, 18 May 2016 01:50:29 +0000 Subject: [PATCH] Test that a feature gated cfg variable in a `cfg_attr` on an unconfigured item is allowed --- src/test/compile-fail/expanded-cfg.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/test/compile-fail/expanded-cfg.rs b/src/test/compile-fail/expanded-cfg.rs index 2f74aeba9eb43..a15e0548a8681 100644 --- a/src/test/compile-fail/expanded-cfg.rs +++ b/src/test/compile-fail/expanded-cfg.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(rustc_attrs)] +#![feature(custom_attribute, rustc_attrs)] macro_rules! mac { {} => { @@ -16,6 +16,9 @@ macro_rules! mac { mod m { #[lang_item] fn f() {} + + #[cfg_attr(target_thread_local, custom)] + fn g() {} } } }