Skip to content
This repository has been archived by the owner on May 23, 2024. It is now read-only.

ices/109304.rs: fixed with errors #1561

Merged
merged 1 commit into from
Apr 5, 2023
Merged

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Apr 5, 2023

Issue: rust-lang/rust#109304

#![recursion_limit = "10"]
macro_rules! link {
    ($outer:ident, $inner:ident) => {
        struct $outer($inner);
        impl $outer {
            fn new() -> $outer {
                $outer($inner::new())
            }
        }
        impl std::ops::Deref for $outer {
            type Target = $inner;
            fn deref(&self) -> &$inner {
                &self.0
            }
        }
    };
}

struct Bottom;

impl Bottom {
    fn new() -> Bottom {
        Bottom
    }
}

link!(Top, A);
link!(A, B);
link!(B, C);
link!(C, D);
link!(D, E);
link!(E, F);
link!(F, G);
link!(G, H);
link!(H, I);
link!(I, J);
link!(J, K);
link!(K, Bottom);

fn main() {}
=== stdout ===
=== stderr ===
error: reached the recursion limit finding the struct tail for `Bottom`
  |
  = help: consider increasing the recursion limit by adding a `#![recursion_limit = "20"]`

error: aborting due to previous error

==============

=== stdout ===
=== stderr ===
error: reached the recursion limit finding the struct tail for `Bottom`
  |
  = help: consider increasing the recursion limit by adding a `#![recursion_limit = "20"]`

error: aborting due to previous error

==============
@JohnTitor JohnTitor merged commit ffaef82 into master Apr 5, 2023
@JohnTitor JohnTitor deleted the autofix/ices/109304.rs branch April 5, 2023 08:19
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants