-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Closed
Copy link
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
Given the following code:
pub fn main() {
let x = [0; 1111111111111111111111111111111111111111111111111111111_u128];
}
The current output is:
error: integer literal is too large
--> src/main.rs:2:17
|
2 | let x = [0; 1111111111111111111111111111111111111111111111111111111_u128];
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: could not compile `playground` due to previous error
It would be nice if the message could say something like "integer literal is too large, value exceeds limit of ${u128::MAX}" or something like that
leonardo-m
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.