about summary refs log tree commit diff
path: root/tests/ui/proc-macro/cfg-attr-trace.rs
blob: 412c65bed1d88dae3bd409010e4d0cbeb44a07f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Ensure that `cfg_attr_trace` attributes aren't observable by proc-macros.

//@ check-pass
//@ proc-macro: test-macros.rs

#![feature(cfg_eval)]

#[macro_use]
extern crate test_macros;

#[cfg_eval]
#[test_macros::print_attr]
#[cfg_attr(false, test_macros::print_attr)]
#[cfg_attr(true, test_macros::print_attr)]
struct S;

#[cfg_eval]
#[test_macros::print_attr]
#[cfg(true)]
struct Z;

fn main() {}