We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The following causes rustc to keel over
enum Tree<A> { Leaf(A), Node(Box<Tree<(A, A)>>) } fn size<A>(t : &Tree<A>) -> int { match t { &Leaf(_) => 1, &Node(box ref t) => size(t) } } fn main () {} // task 'rustc' has overflowed its stack // Compilation illegal instruction (core dumped) at Fri Nov 14 18:04:13
However it handles the actual declaration fine, the issue seems to be due to the polymorphic recursion in size. This compiles fine
size
enum Tree<A> { Leaf(A), Node(Box<Tree<(A, A)>>) } fn main () {}
My rustc information is
rustc 0.13.0-nightly (5745e4195 2014-11-12 22:57:16 +0000) binary: rustc commit-hash: 5745e419502d753deb3f42026fa35e015bc5d3fb commit-date: 2014-11-12 22:57:16 +0000 host: x86_64-unknown-linux-gnu release: 0.13.0-nightly
The text was updated successfully, but these errors were encountered:
Dupe of #4363. Thanks for filing!
Sorry, something went wrong.
No branches or pull requests
The following causes rustc to keel over
However it handles the actual declaration fine, the issue seems to be due to the polymorphic recursion in
size
. This compiles fineMy rustc information is
The text was updated successfully, but these errors were encountered: