ICE when passing numeric literals to str as generics #82199
Labels
A-const-generics
Area: const generics (parameters and arguments)
C-bug
Category: This is a bug.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Here's a fun one I discovered back in 2019 when I first started learning Rust and forgot to report (sorry!). I figured I'd try the genius idea of making a string of length 3 by passing
3
as a generic. I dug up the code that caused the problem, and it sure enough causes the same crash now.Code
Meta
rustc --version --verbose
:Error output
Backtrace
The text was updated successfully, but these errors were encountered: