2019-04-27 11:56:57 +00:00
|
|
|
error: literal out of range for `u8`
|
2019-01-17 09:22:52 +00:00
|
|
|
--> $DIR/deny-overflowing-literals.rs:2:17
|
2018-09-23 14:59:06 +00:00
|
|
|
|
|
|
|
|
LL | let x: u8 = 256;
|
|
|
|
| ^^^
|
|
|
|
|
|
2020-03-14 03:57:04 +00:00
|
|
|
= note: the literal `256` does not fit into the type `u8` whose range is `0..=255`
|
2022-09-18 15:55:36 +00:00
|
|
|
= note: `#[deny(overflowing_literals)]` on by default
|
2018-09-23 14:59:06 +00:00
|
|
|
|
2019-05-23 20:48:26 +00: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 14:59:06 +00:00
|
|
|
|