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

stack overflow by enum and const #36163

Closed
mikhail-m1 opened this issue Aug 31, 2016 · 0 comments
Closed

stack overflow by enum and const #36163

mikhail-m1 opened this issue Aug 31, 2016 · 0 comments

Comments

@mikhail-m1
Copy link
Contributor

while I was working on #35309 I found example not detected by static recursion checker

const A : i32 = Foo::B;
enum Foo { B = A }
fn main() {}

I'm going to fix it

mikhail-m1 added a commit to mikhail-m1/rust that referenced this issue Oct 5, 2016
… were skipped while checking for recursion.
bors added a commit that referenced this issue Oct 5, 2016
fix stack overflow by enum and const

fixes #36163
mikhail-m1 added a commit to mikhail-m1/rust that referenced this issue Dec 3, 2016
… were skipped while checking for recursion.
bors added a commit that referenced this issue Dec 5, 2016
fix stack overflow by enum and cont issue #36163

some paths were skipped while checking for recursion.

I fixed bug reproduces on win64 cargo test. In previous PR #36458 time complexity was exponential in case of linked const values. Now it's linear.

r? @alexcrichton
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

Successfully merging a pull request may close this issue.

1 participant