rust/tests/ui/enum/enum-discrim-too-small2.stderr

44 lines
1.4 KiB
Plaintext
Raw Normal View History

2019-04-27 06:56:57 -05:00
error: literal out of range for `i8`
2018-12-25 09:56:47 -06:00
--> $DIR/enum-discrim-too-small2.rs:8:11
2018-08-08 07:28:26 -05:00
|
2019-03-09 06:03:44 -06:00
LL | Ci8 = 223,
2018-08-08 07:28:26 -05:00
| ^^^
|
2022-09-18 10:55:36 -05:00
= note: the literal `223` does not fit into the type `i8` whose range is `-128..=127`
= help: consider using the type `u8` instead
2020-01-22 17:57:38 -06:00
note: the lint level is defined here
2018-12-25 09:56:47 -06:00
--> $DIR/enum-discrim-too-small2.rs:1:9
2018-08-08 07:28:26 -05:00
|
LL | #![deny(overflowing_literals)]
| ^^^^^^^^^^^^^^^^^^^^
2019-04-27 06:56:57 -05:00
error: literal out of range for `i16`
2018-12-25 09:56:47 -06:00
--> $DIR/enum-discrim-too-small2.rs:15:12
2018-08-08 07:28:26 -05:00
|
2019-03-09 06:03:44 -06:00
LL | Ci16 = 55555,
2018-08-08 07:28:26 -05:00
| ^^^^^
|
= note: the literal `55555` does not fit into the type `i16` whose range is `-32768..=32767`
2021-02-13 23:42:32 -06:00
= help: consider using the type `u16` instead
2018-08-08 07:28:26 -05:00
2019-04-27 06:56:57 -05:00
error: literal out of range for `i32`
2018-12-25 09:56:47 -06:00
--> $DIR/enum-discrim-too-small2.rs:22:12
2018-08-08 07:28:26 -05:00
|
2019-03-09 06:03:44 -06:00
LL | Ci32 = 3_000_000_000,
2018-08-08 07:28:26 -05:00
| ^^^^^^^^^^^^^
|
= note: the literal `3_000_000_000` does not fit into the type `i32` whose range is `-2147483648..=2147483647`
2021-02-13 23:42:32 -06:00
= help: consider using the type `u32` instead
2018-08-08 07:28:26 -05:00
2019-04-27 06:56:57 -05:00
error: literal out of range for `i64`
2018-12-25 09:56:47 -06:00
--> $DIR/enum-discrim-too-small2.rs:29:12
2018-08-08 07:28:26 -05:00
|
2019-03-09 06:03:44 -06:00
LL | Ci64 = 9223372036854775809,
2018-08-08 07:28:26 -05:00
| ^^^^^^^^^^^^^^^^^^^
|
= note: the literal `9223372036854775809` does not fit into the type `i64` whose range is `-9223372036854775808..=9223372036854775807`
2021-02-13 23:42:32 -06:00
= help: consider using the type `u64` instead
2018-08-08 07:28:26 -05:00
error: aborting due to 4 previous errors