Closed
Description
While I recognize this is not what one might call a typical use case, I feel that the compiler should do something more useful than crash in this circumstance.
rustup run stable rustc --version
rustc 1.15.1 (021bd294c 2017-02-08)
rustup run nightly rustc --version
rustc 1.17.0-nightly (b1e31766d 2017-03-03)
rustup run stable cargo build
Compiling reference_so v0.1.0 (file:///home/tyler/reference_so)
error: Could not compile `reference_so`.
To learn more, run the command again with --verbose.
rustup run nightly cargo build
Compiling reference_so v0.1.0 (file:///home/tyler/reference_so)
thread 'rustc' has overflowed its stack
fatal runtime error: stack overflow
error: Could not compile `reference_so`.
To learn more, run the command again with --verbose.
Both the number of references and the #![recursion_limit] are minimal for my system.
I believe this may be related to #40119