Closed
Description
The following code snippet:
// foo.rs
mod foo;
fn main() {}
will result in the compiler throwing:
error: internal compiler error: unexpected failure
note: the compiler hit an unexpected failure path. this is a bug
with the top line of the backtrace that the error told me to run being:
rust: task b4d04940 ran out of stack
Removing the mod foo; statement fixes, and is seemingly because of the cyclic import that this causes. Is there a way that self-references using mod can be caught and handled nicely? With something like this sample it's easy to see the error and to debug, but I was chasing a typo in my mod statement for 5 minutes before I found it in my source...