-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Rustc crashes rather than failing to compile when wrong sized type is used #39974
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Labels
E-needs-test
Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Comments
The HIR const evaluator can't evaluate this before typeck. It should probably report a better error though. Easy to fix, but will get fixed along the way with const eval improvements anyway. |
FWIW, confirmed on macOS
Output:
|
E-needstest.
|
venkatagiri
added a commit
to venkatagiri/rust
that referenced
this issue
May 25, 2017
Mark-Simulacrum
added a commit
to Mark-Simulacrum/rust
that referenced
this issue
May 26, 2017
…ulacrum regression test for rust-lang#39974 closes rust-lang#39974 r? @Mark-Simulacrum
Mark-Simulacrum
added a commit
to Mark-Simulacrum/rust
that referenced
this issue
May 27, 2017
…ulacrum regression test for rust-lang#39974 closes rust-lang#39974 r? @Mark-Simulacrum
Mark-Simulacrum
added a commit
to Mark-Simulacrum/rust
that referenced
this issue
May 27, 2017
…ulacrum regression test for rust-lang#39974 closes rust-lang#39974 r? @Mark-Simulacrum
Mark-Simulacrum
added a commit
to Mark-Simulacrum/rust
that referenced
this issue
May 28, 2017
…ulacrum regression test for rust-lang#39974 closes rust-lang#39974 r? @Mark-Simulacrum
Mark-Simulacrum
added a commit
to Mark-Simulacrum/rust
that referenced
this issue
May 28, 2017
…ulacrum regression test for rust-lang#39974 closes rust-lang#39974 r? @Mark-Simulacrum
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Labels
E-needs-test
Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
I was playing around with some code and found a condition that should result in a compilation error but results in a crash instead.
This code compiles normally:
If you change
const LENGTH: usize = 4;
toconst LENGTH: u32 = 4;
you get a compilation error, as expected.However, if you change it to
const LENGTH: f64 = 4;
you get a crash.Meta
Backtrace:
The text was updated successfully, but these errors were encountered: