rust/tests/ui/infinite/issue-41731-infinite-macro-print.rs
2023-01-11 09:32:08 +00:00

16 lines
339 B
Rust

// compile-flags: -Z trace-macros
#![recursion_limit = "5"]
fn main() {
macro_rules! stack {
($overflow:expr) => {
print!(stack!($overflow));
//~^ ERROR recursion limit reached while expanding
//~| ERROR format argument must be a string literal
};
}
stack!("overflow");
}