11error: casting `i8` to `i16` may become silently lossy if you later change the type
2- --> tests/ui/cast_lossless_integer.rs:8 :13
2+ --> tests/ui/cast_lossless_integer.rs:9 :13
33 |
44LL | let _ = 1i8 as i16;
55 | ^^^^^^^^^^ help: try: `i16::from(1i8)`
@@ -8,127 +8,127 @@ LL | let _ = 1i8 as i16;
88 = help: to override `-D warnings` add `#[allow(clippy::cast_lossless)]`
99
1010error: casting `i8` to `i32` may become silently lossy if you later change the type
11- --> tests/ui/cast_lossless_integer.rs:9 :13
11+ --> tests/ui/cast_lossless_integer.rs:10 :13
1212 |
1313LL | let _ = 1i8 as i32;
1414 | ^^^^^^^^^^ help: try: `i32::from(1i8)`
1515
1616error: casting `i8` to `i64` may become silently lossy if you later change the type
17- --> tests/ui/cast_lossless_integer.rs:10 :13
17+ --> tests/ui/cast_lossless_integer.rs:11 :13
1818 |
1919LL | let _ = 1i8 as i64;
2020 | ^^^^^^^^^^ help: try: `i64::from(1i8)`
2121
2222error: casting `u8` to `i16` may become silently lossy if you later change the type
23- --> tests/ui/cast_lossless_integer.rs:11 :13
23+ --> tests/ui/cast_lossless_integer.rs:12 :13
2424 |
2525LL | let _ = 1u8 as i16;
2626 | ^^^^^^^^^^ help: try: `i16::from(1u8)`
2727
2828error: casting `u8` to `i32` may become silently lossy if you later change the type
29- --> tests/ui/cast_lossless_integer.rs:12 :13
29+ --> tests/ui/cast_lossless_integer.rs:13 :13
3030 |
3131LL | let _ = 1u8 as i32;
3232 | ^^^^^^^^^^ help: try: `i32::from(1u8)`
3333
3434error: casting `u8` to `i64` may become silently lossy if you later change the type
35- --> tests/ui/cast_lossless_integer.rs:13 :13
35+ --> tests/ui/cast_lossless_integer.rs:14 :13
3636 |
3737LL | let _ = 1u8 as i64;
3838 | ^^^^^^^^^^ help: try: `i64::from(1u8)`
3939
4040error: casting `u8` to `u16` may become silently lossy if you later change the type
41- --> tests/ui/cast_lossless_integer.rs:14 :13
41+ --> tests/ui/cast_lossless_integer.rs:15 :13
4242 |
4343LL | let _ = 1u8 as u16;
4444 | ^^^^^^^^^^ help: try: `u16::from(1u8)`
4545
4646error: casting `u8` to `u32` may become silently lossy if you later change the type
47- --> tests/ui/cast_lossless_integer.rs:15 :13
47+ --> tests/ui/cast_lossless_integer.rs:16 :13
4848 |
4949LL | let _ = 1u8 as u32;
5050 | ^^^^^^^^^^ help: try: `u32::from(1u8)`
5151
5252error: casting `u8` to `u64` may become silently lossy if you later change the type
53- --> tests/ui/cast_lossless_integer.rs:16 :13
53+ --> tests/ui/cast_lossless_integer.rs:17 :13
5454 |
5555LL | let _ = 1u8 as u64;
5656 | ^^^^^^^^^^ help: try: `u64::from(1u8)`
5757
5858error: casting `i16` to `i32` may become silently lossy if you later change the type
59- --> tests/ui/cast_lossless_integer.rs:17 :13
59+ --> tests/ui/cast_lossless_integer.rs:18 :13
6060 |
6161LL | let _ = 1i16 as i32;
6262 | ^^^^^^^^^^^ help: try: `i32::from(1i16)`
6363
6464error: casting `i16` to `i64` may become silently lossy if you later change the type
65- --> tests/ui/cast_lossless_integer.rs:18 :13
65+ --> tests/ui/cast_lossless_integer.rs:19 :13
6666 |
6767LL | let _ = 1i16 as i64;
6868 | ^^^^^^^^^^^ help: try: `i64::from(1i16)`
6969
7070error: casting `u16` to `i32` may become silently lossy if you later change the type
71- --> tests/ui/cast_lossless_integer.rs:19 :13
71+ --> tests/ui/cast_lossless_integer.rs:20 :13
7272 |
7373LL | let _ = 1u16 as i32;
7474 | ^^^^^^^^^^^ help: try: `i32::from(1u16)`
7575
7676error: casting `u16` to `i64` may become silently lossy if you later change the type
77- --> tests/ui/cast_lossless_integer.rs:20 :13
77+ --> tests/ui/cast_lossless_integer.rs:21 :13
7878 |
7979LL | let _ = 1u16 as i64;
8080 | ^^^^^^^^^^^ help: try: `i64::from(1u16)`
8181
8282error: casting `u16` to `u32` may become silently lossy if you later change the type
83- --> tests/ui/cast_lossless_integer.rs:21 :13
83+ --> tests/ui/cast_lossless_integer.rs:22 :13
8484 |
8585LL | let _ = 1u16 as u32;
8686 | ^^^^^^^^^^^ help: try: `u32::from(1u16)`
8787
8888error: casting `u16` to `u64` may become silently lossy if you later change the type
89- --> tests/ui/cast_lossless_integer.rs:22 :13
89+ --> tests/ui/cast_lossless_integer.rs:23 :13
9090 |
9191LL | let _ = 1u16 as u64;
9292 | ^^^^^^^^^^^ help: try: `u64::from(1u16)`
9393
9494error: casting `i32` to `i64` may become silently lossy if you later change the type
95- --> tests/ui/cast_lossless_integer.rs:23 :13
95+ --> tests/ui/cast_lossless_integer.rs:24 :13
9696 |
9797LL | let _ = 1i32 as i64;
9898 | ^^^^^^^^^^^ help: try: `i64::from(1i32)`
9999
100100error: casting `u32` to `i64` may become silently lossy if you later change the type
101- --> tests/ui/cast_lossless_integer.rs:24 :13
101+ --> tests/ui/cast_lossless_integer.rs:25 :13
102102 |
103103LL | let _ = 1u32 as i64;
104104 | ^^^^^^^^^^^ help: try: `i64::from(1u32)`
105105
106106error: casting `u32` to `u64` may become silently lossy if you later change the type
107- --> tests/ui/cast_lossless_integer.rs:25 :13
107+ --> tests/ui/cast_lossless_integer.rs:26 :13
108108 |
109109LL | let _ = 1u32 as u64;
110110 | ^^^^^^^^^^^ help: try: `u64::from(1u32)`
111111
112112error: casting `u8` to `u16` may become silently lossy if you later change the type
113- --> tests/ui/cast_lossless_integer.rs:28 :13
113+ --> tests/ui/cast_lossless_integer.rs:29 :13
114114 |
115115LL | let _ = (1u8 + 1u8) as u16;
116116 | ^^^^^^^^^^^^^^^^^^ help: try: `u16::from(1u8 + 1u8)`
117117
118118error: casting `i8` to `I64` may become silently lossy if you later change the type
119- --> tests/ui/cast_lossless_integer.rs:30 :13
119+ --> tests/ui/cast_lossless_integer.rs:31 :13
120120 |
121121LL | let _ = 1i8 as I64;
122122 | ^^^^^^^^^^ help: try: `I64::from(1i8)`
123123
124124error: casting `i8` to `i32` may become silently lossy if you later change the type
125- --> tests/ui/cast_lossless_integer.rs:64 :13
125+ --> tests/ui/cast_lossless_integer.rs:70 :13
126126 |
127127LL | let _ = sign_cast!(x, u8, i8) as i32;
128128 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `i32::from(sign_cast!(x, u8, i8))`
129129
130130error: casting `i8` to `i32` may become silently lossy if you later change the type
131- --> tests/ui/cast_lossless_integer.rs:65 :13
131+ --> tests/ui/cast_lossless_integer.rs:71 :13
132132 |
133133LL | let _ = (sign_cast!(x, u8, i8) + 1) as i32;
134134 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `i32::from(sign_cast!(x, u8, i8) + 1)`
0 commit comments