1 // Test that the recursion limit can be changed and that the compiler
2 // suggests a fix. In this case, we have a long chain of Deref impls
3 // which will cause an overflow during the autoderef loop.
4 // compile-flags: -Zdeduplicate-diagnostics=yes
7 #![recursion_limit="10"]
10 ($outer:ident, $inner:ident) => {
11 struct $outer($inner);
19 impl std::ops::Deref for $outer {
22 fn deref(&self) -> &$inner {
51 let x: &Bottom = &t; //~ ERROR mismatched types
52 //~^ error recursion limit