Skip to content

Commit 3636ce7

Browse files
committed
Test that a feature gated cfg variable in a cfg_attr on an unconfigured item is allowed
1 parent 15d5074 commit 3636ce7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/test/compile-fail/expanded-cfg.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,17 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#![feature(rustc_attrs)]
11+
#![feature(custom_attribute, rustc_attrs)]
1212

1313
macro_rules! mac {
1414
{} => {
1515
#[cfg(attr)]
1616
mod m {
1717
#[lang_item]
1818
fn f() {}
19+
20+
#[cfg_attr(target_thread_local, custom)]
21+
fn g() {}
1922
}
2023
}
2124
}

0 commit comments

Comments
 (0)