2019-04-27 06:56:57 -05:00
|
|
|
error: literal out of range for `u8`
|
2019-01-17 03:22:52 -06:00
|
|
|
--> $DIR/deny-overflowing-literals.rs:2:17
|
2018-09-23 09:59:06 -05:00
|
|
|
|
|
|
|
|
LL | let x: u8 = 256;
|
|
|
|
| ^^^
|
|
|
|
|
|
2020-03-13 22:57:04 -05:00
|
|
|
= note: the literal `256` does not fit into the type `u8` whose range is `0..=255`
|
2022-09-18 10:55:36 -05:00
|
|
|
= note: `#[deny(overflowing_literals)]` on by default
|
2018-09-23 09:59:06 -05:00
|
|
|
|
2019-05-23 15:48:26 -05:00
|
|
|
error: range endpoint is out of range for `u8`
|
|
|
|
--> $DIR/deny-overflowing-literals.rs:5:14
|
|
|
|
|
|
|
|
|
LL | for _ in 0..256u8 {}
|
|
|
|
| ^^^^^^^^ help: use an inclusive range instead: `0..=255u8`
|
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
2018-09-23 09:59:06 -05:00
|
|
|
|