-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-frontendArea: Compiler frontend (errors, parsing and HIR)Area: Compiler frontend (errors, parsing and HIR)A-resolveArea: Name/path resolution done by `rustc_resolve` specificallyArea: Name/path resolution done by `rustc_resolve` specificallyI-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
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...
Metadata
Metadata
Assignees
Labels
A-frontendArea: Compiler frontend (errors, parsing and HIR)Area: Compiler frontend (errors, parsing and HIR)A-resolveArea: Name/path resolution done by `rustc_resolve` specificallyArea: Name/path resolution done by `rustc_resolve` specificallyI-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️