-
Notifications
You must be signed in to change notification settings - Fork 13.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ICE: pattern: attempt to add with overflow
#136514
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
C-bug
Category: This is a bug.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
requires-debug-assertions
This issue requires a build of rustc or tooling with debug-assertions in some way
S-has-mcve
Status: A Minimal Complete and Verifiable Example has been found for this issue
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
Program output
|
without debug assertions error: literal out of range for `u128`
--> A5635DBE231F0C3535BE7A41BE7846C6C6D75F86CAE0C9F78F9847A246403528.rs:13:8
|
13 | fn foo(-128..=127: u128) {}
| ^^^^ this value does not fit into the type `u128` whose range is `0..=340282366920938463463374607431768211455` 😄 |
seems it can not be reproduced on nightly now, this is the error: --> ./t/x.rs:1:8
|
1 | fn foo(-128..=127: u128) {}
| ^^^^ the trait `Neg` is not implemented for `u128`
|
= help: the following other types implement trait `Neg`:
&f128
&f16
&f32
&f64
&i128
&i16
&i32
&i64
and 12 others
error: aborting due to 1 previous error |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
C-bug
Category: This is a bug.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
requires-debug-assertions
This issue requires a build of rustc or tooling with debug-assertions in some way
S-has-mcve
Status: A Minimal Complete and Verifiable Example has been found for this issue
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
auto-reduced (treereduce-rust):
original:
Version information
Possibly related line of code:
rust/compiler/rustc_mir_build/src/thir/pattern/mod.rs
Lines 231 to 243 in 534d79a
Command:
/home/gh-matthiaskrgr/.rustup/toolchains/local-debug-assertions/bin/rustc
The text was updated successfully, but these errors were encountered: