rustc overflowed its stack: extern crate inside const inside external trait impl #71157
Labels
C-bug
Category: This is a bug.
E-needs-bisection
Call for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc
I-crash
Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.
P-medium
Medium priority
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
...but only when the crate is introduced solely through edition2018 extern prelude and not when an
extern crate
statement exists at root level.Minimized reproduction (on playground)
(Reason for this code shape: deriving serde's traits puts the impl within a
const
and usesextern crate
to get serde at a known name.)Edits that make this not overflow the stack:
extern crate serde;
at root level.Deserialize
trait definition.const
around theextern crate
statement.const
declaration to root scope.Meta
rustc --version --verbose
:This overflows the stack back to 1.31.0, the first stable release with edition 2018 support.
cargo check
is enough to get the stack overflow.Error output
The text was updated successfully, but these errors were encountered: