]> git.proxmox.com Git - rustc.git/blob - src/test/ui/did_you_mean/recursion_limit_macro.rs
Update unsuspicious file list
[rustc.git] / src / test / ui / did_you_mean / recursion_limit_macro.rs
1 // Test that the recursion limit can be changed and that the compiler
2 // suggests a fix. In this case, we have a recursing macro that will
3 // overflow if the number of arguments surpasses the recursion limit.
4
5 #![allow(dead_code)]
6 #![recursion_limit="10"]
7
8 macro_rules! recurse {
9 () => { };
10 ($t:tt $($tail:tt)*) => { recurse!($($tail)*) }; //~ ERROR recursion limit
11 }
12
13 fn main() {
14 recurse!(0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9);
15 }