mozilla/rust — Issue #1821: recursive enum runs out of stack
Author: erickt
Created: 2012-02-12 16:17:10+00:00
State: open

I always forget to put a recursive enum in a block. When I don't I get a non-helpful error:

enum t {
foo([t])
}
fn main() {}

With this error:

error: internal compiler error unexpected failure
note: The compiler hit an unexpected failure path. This is a bug. Try running with RUST_LOG=rustc=0,::rt::backtrace to get further details and report the results to github.com/mozilla/rust/issues
rust: upcall fail 'explicit failure', ../src/comp/driver/rustc.rs:182
rust: domain main @0x102029600 root task failed

With `RUST_LOG=rustc=0,::rt::backtrace`, it says:

rust: task 101e019e0 ran out of stack
error: internal compiler error unexpected failure
note: The compiler hit an unexpected failure path. This is a bug. Try running with RUST_LOG=rustc=0,::rt::backtrace to get further details and report the results to github.com/mozilla/rust/issues
rust: upcall fail 'explicit failure', ../src/comp/driver/rustc.rs:182
rust: domain main @0x102029600 root task failed

It would be nice if we had an explicit error message for this situation.