rust/tests/ui/proc-macro/issue-78675-captured-inner-attrs.rs
2024-02-16 20:02:50 +00:00

33 lines
510 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() {}