rust/tests/ui/infinite/issue-41731-infinite-macro-print.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
339 B
Rust
Raw Normal View History

2022-12-07 10:45:49 +00:00
// 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");
}