Skip to content

Rustc compiler freezes when creating a recursive data structure #33310

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
antoyo opened this issue May 1, 2016 · 2 comments
Closed

Rustc compiler freezes when creating a recursive data structure #33310

antoyo opened this issue May 1, 2016 · 2 comments

Comments

@antoyo
Copy link
Contributor

antoyo commented May 1, 2016

Hello.
The following code makes the compiler freezes:

struct Node {
    value: i32,
    left: Option<Node>,
    right: Option<Node>,
}

fn main() {
    println!("Hello, world!");
}

(the version with Option<Box<Node>> works fine, though)

Running cargo build takes forever. I use rustc 1.8.0 on ArchLinux.

Thanks to fix this issue.

@hanna-kruppe
Copy link
Contributor

Should be fixed on beta and nightly. See also #32326 #32619 #33144 #33180

@antoyo
Copy link
Contributor Author

antoyo commented May 1, 2016

Sorry, I had not found this issue.

@antoyo antoyo closed this as completed May 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants