Skip to content
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

ICE: Infinite Recursion when compiling recursive type #17483

Closed
arielb1 opened this issue Sep 23, 2014 · 3 comments
Closed

ICE: Infinite Recursion when compiling recursive type #17483

arielb1 opened this issue Sep 23, 2014 · 3 comments

Comments

@arielb1
Copy link
Contributor

arielb1 commented Sep 23, 2014

The following code causes infinite recursion in rustc:

struct Omega<T>(Vec<Omega<Option<T>>>);
fn main () {}

version: rustc 0.12.0-pre (2f9669c74 2014-09-23 12:45:45 +0000), and also today's play.rust-lang.org

The recursion seems to be between various lines of middle::ty::type_contents::tc_ty.

Note that the following code compiles (note Box instead of Vec):

struct Omega<T>(Box<Omega<Option<T>>>);
fn tickle<T>(r: ||->Omega<T>) {}
fn main () {}

but if you add

fn basilisk<T>(r: Option<Omega<T>>) {}

the crash happens again

@arielb1
Copy link
Contributor Author

arielb1 commented Sep 23, 2014

Seems to be a dupe of #17431.

@isabelmu
Copy link
Contributor

isabelmu commented Oct 6, 2014

I believe this is a dupe of #4363, since Omega is representable and instantiable (both with Vec and with Box), but causes infinite type generation.

@ghost
Copy link

ghost commented Oct 18, 2014

Indeed, closing as a dupe of #4363. Thanks @typelist!

@ghost ghost closed this as completed Oct 18, 2014
lnicola pushed a commit to lnicola/rust that referenced this issue Jul 28, 2024
minor : fixes for ratoml module

This is a follow-up PR to rust-lang#17058.

- Parse errors are reflected as such by defining a new variant called `ConfigError::ParseError`
- New error collection has been added to store config level agnostic errors.

EDIT : Some things that this PR promised to solve are removed and will be addressed by other PRs
RalfJung pushed a commit to RalfJung/rust that referenced this issue Aug 1, 2024
minor : fixes for ratoml module

This is a follow-up PR to rust-lang#17058.

- Parse errors are reflected as such by defining a new variant called `ConfigError::ParseError`
- New error collection has been added to store config level agnostic errors.

EDIT : Some things that this PR promised to solve are removed and will be addressed by other PRs
This issue was closed.
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