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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

44 lines
1.4 KiB
Plaintext
Raw Normal View History

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