X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Ftest%2Fui%2Flint%2Flint-type-overflow.stderr;h=f0a8f507d57237486a7fcdbd74a054673de6d56a;hb=d00ca112020680928aadb221aad13bd52634823b;hp=7715c0d3a4db93d8e1a1754bbb2dd2b860dba032;hpb=a2c0499b39b19563acaaffb9c54179b4208ec146;p=rust.git diff --git a/src/test/ui/lint/lint-type-overflow.stderr b/src/test/ui/lint/lint-type-overflow.stderr index 7715c0d3a4d..f0a8f507d57 100644 --- a/src/test/ui/lint/lint-type-overflow.stderr +++ b/src/test/ui/lint/lint-type-overflow.stderr @@ -26,6 +26,7 @@ LL | let x1: i8 = 128; | ^^^ | = note: the literal `128` does not fit into the type `i8` whose range is `-128..=127` + = help: consider using `u8` instead error: literal out of range for `i8` --> $DIR/lint-type-overflow.rs:18:19 @@ -34,6 +35,7 @@ LL | let x3: i8 = -129; | ^^^ | = note: the literal `129` does not fit into the type `i8` whose range is `-128..=127` + = help: consider using `i16` instead error: literal out of range for `i8` --> $DIR/lint-type-overflow.rs:19:19 @@ -42,6 +44,7 @@ LL | let x3: i8 = -(129); | ^^^^^ | = note: the literal `129` does not fit into the type `i8` whose range is `-128..=127` + = help: consider using `i16` instead error: literal out of range for `i8` --> $DIR/lint-type-overflow.rs:20:20 @@ -50,6 +53,7 @@ LL | let x3: i8 = -{129}; | ^^^ | = note: the literal `129` does not fit into the type `i8` whose range is `-128..=127` + = help: consider using `u8` instead error: literal out of range for `i8` --> $DIR/lint-type-overflow.rs:22:10 @@ -58,6 +62,7 @@ LL | test(1000); | ^^^^ | = note: the literal `1000` does not fit into the type `i8` whose range is `-128..=127` + = help: consider using `i16` instead error: literal out of range for `i8` --> $DIR/lint-type-overflow.rs:24:13 @@ -66,6 +71,7 @@ LL | let x = 128_i8; | ^^^^^^ | = note: the literal `128_i8` does not fit into the type `i8` whose range is `-128..=127` + = help: consider using `u8` instead error: literal out of range for `i8` --> $DIR/lint-type-overflow.rs:28:14 @@ -74,6 +80,7 @@ LL | let x = -129_i8; | ^^^^^^ | = note: the literal `129_i8` does not fit into the type `i8` whose range is `-128..=127` + = help: consider using `i16` instead error: literal out of range for `i32` --> $DIR/lint-type-overflow.rs:32:18 @@ -82,6 +89,7 @@ LL | let x: i32 = 2147483648; | ^^^^^^^^^^ | = note: the literal `2147483648` does not fit into the type `i32` whose range is `-2147483648..=2147483647` + = help: consider using `u32` instead error: literal out of range for `i32` --> $DIR/lint-type-overflow.rs:33:13 @@ -90,6 +98,7 @@ LL | let x = 2147483648_i32; | ^^^^^^^^^^^^^^ | = note: the literal `2147483648_i32` does not fit into the type `i32` whose range is `-2147483648..=2147483647` + = help: consider using `u32` instead error: literal out of range for `i32` --> $DIR/lint-type-overflow.rs:36:19 @@ -98,6 +107,7 @@ LL | let x: i32 = -2147483649; | ^^^^^^^^^^ | = note: the literal `2147483649` does not fit into the type `i32` whose range is `-2147483648..=2147483647` + = help: consider using `i64` instead error: literal out of range for `i32` --> $DIR/lint-type-overflow.rs:37:14 @@ -106,6 +116,7 @@ LL | let x = -2147483649_i32; | ^^^^^^^^^^^^^^ | = note: the literal `2147483649_i32` does not fit into the type `i32` whose range is `-2147483648..=2147483647` + = help: consider using `i64` instead error: literal out of range for `i32` --> $DIR/lint-type-overflow.rs:38:13 @@ -114,6 +125,7 @@ LL | let x = 2147483648; | ^^^^^^^^^^ | = note: the literal `2147483648` does not fit into the type `i32` whose range is `-2147483648..=2147483647` + = help: consider using `u32` instead error: literal out of range for `i64` --> $DIR/lint-type-overflow.rs:40:13 @@ -122,6 +134,7 @@ LL | let x = 9223372036854775808_i64; | ^^^^^^^^^^^^^^^^^^^^^^^ | = note: the literal `9223372036854775808_i64` does not fit into the type `i64` whose range is `-9223372036854775808..=9223372036854775807` + = help: consider using `u64` instead error: literal out of range for `i64` --> $DIR/lint-type-overflow.rs:42:13 @@ -130,6 +143,7 @@ LL | let x = 18446744073709551615_i64; | ^^^^^^^^^^^^^^^^^^^^^^^^ | = note: the literal `18446744073709551615_i64` does not fit into the type `i64` whose range is `-9223372036854775808..=9223372036854775807` + = help: consider using `u64` instead error: literal out of range for `i64` --> $DIR/lint-type-overflow.rs:43:19 @@ -138,6 +152,7 @@ LL | let x: i64 = -9223372036854775809; | ^^^^^^^^^^^^^^^^^^^ | = note: the literal `9223372036854775809` does not fit into the type `i64` whose range is `-9223372036854775808..=9223372036854775807` + = help: consider using `i128` instead error: literal out of range for `i64` --> $DIR/lint-type-overflow.rs:44:14 @@ -146,6 +161,7 @@ LL | let x = -9223372036854775809_i64; | ^^^^^^^^^^^^^^^^^^^^^^^ | = note: the literal `9223372036854775809_i64` does not fit into the type `i64` whose range is `-9223372036854775808..=9223372036854775807` + = help: consider using `i128` instead error: aborting due to 18 previous errors