]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/did_you_mean/recursion_limit_deref.rs
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