Closed
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
Activity
[-]"error: integer literal is too large" should tell about limit[/-][+]"error: integer literal is too large" should mention the actual type limit[/+]lyming2007 commentedon Dec 19, 2022
@rustbot claim
IntLiteralTooLarge
#106361Rollup merge of rust-lang#106361 - clubby789:int-literal-too-large, r…