1
Fork 0
rust/tests/ui/proc-macro/cfg-attr-trace.rs
2025-03-26 15:30:12 +03:00

23 lines
435 B
Rust

// Ensure that `cfg_attr_trace` attributes aren't observable by proc-macros.
//@ check-pass
//@ proc-macro: test-macros.rs
#![feature(cfg_boolean_literals)]
#![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() {}