rust/tests/ui/proc-macro/issue-78675-captured-inner-attrs.rs
2023-01-11 09:32:08 +00:00

33 lines
506 B
Rust

// check-pass
// edition:2018
// compile-flags: -Z span-debug
// aux-build:test-macros.rs
#![no_std] // Don't load unnecessary hygiene information from std
extern crate std;
#[macro_use] extern crate test_macros;
macro_rules! foo {(
#[fake_attr]
$item:item
) => (
$item
)}
macro_rules! outer {($item:item) => (
print_bang! { // Identity proc-macro
foo! {
#[fake_attr]
$item
}
}
)}
outer! {
mod bar {
//! Foo
}
}
fn main() {}