rust/tests/ui/lint/deny-overflowing-literals.stderr

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

18 lines
534 B
Plaintext
Raw Normal View History

2019-04-27 06:56:57 -05:00
error: literal out of range for `u8`
--> $DIR/deny-overflowing-literals.rs:2:17
2018-09-23 09:59:06 -05:00
|
LL | let x: u8 = 256;
| ^^^
|
= 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
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