1 error: casting `i8` to `i16` may become silently lossy if you later change the type
2 --> $DIR/cast_lossless_integer.rs:8:13
4 LL | let _ = 1i8 as i16;
5 | ^^^^^^^^^^ help: try: `i16::from(1i8)`
7 = note: `-D clippy::cast-lossless` implied by `-D warnings`
9 error: casting `i8` to `i32` may become silently lossy if you later change the type
10 --> $DIR/cast_lossless_integer.rs:9:13
12 LL | let _ = 1i8 as i32;
13 | ^^^^^^^^^^ help: try: `i32::from(1i8)`
15 error: casting `i8` to `i64` may become silently lossy if you later change the type
16 --> $DIR/cast_lossless_integer.rs:10:13
18 LL | let _ = 1i8 as i64;
19 | ^^^^^^^^^^ help: try: `i64::from(1i8)`
21 error: casting `u8` to `i16` may become silently lossy if you later change the type
22 --> $DIR/cast_lossless_integer.rs:11:13
24 LL | let _ = 1u8 as i16;
25 | ^^^^^^^^^^ help: try: `i16::from(1u8)`
27 error: casting `u8` to `i32` may become silently lossy if you later change the type
28 --> $DIR/cast_lossless_integer.rs:12:13
30 LL | let _ = 1u8 as i32;
31 | ^^^^^^^^^^ help: try: `i32::from(1u8)`
33 error: casting `u8` to `i64` may become silently lossy if you later change the type
34 --> $DIR/cast_lossless_integer.rs:13:13
36 LL | let _ = 1u8 as i64;
37 | ^^^^^^^^^^ help: try: `i64::from(1u8)`
39 error: casting `u8` to `u16` may become silently lossy if you later change the type
40 --> $DIR/cast_lossless_integer.rs:14:13
42 LL | let _ = 1u8 as u16;
43 | ^^^^^^^^^^ help: try: `u16::from(1u8)`
45 error: casting `u8` to `u32` may become silently lossy if you later change the type
46 --> $DIR/cast_lossless_integer.rs:15:13
48 LL | let _ = 1u8 as u32;
49 | ^^^^^^^^^^ help: try: `u32::from(1u8)`
51 error: casting `u8` to `u64` may become silently lossy if you later change the type
52 --> $DIR/cast_lossless_integer.rs:16:13
54 LL | let _ = 1u8 as u64;
55 | ^^^^^^^^^^ help: try: `u64::from(1u8)`
57 error: casting `i16` to `i32` may become silently lossy if you later change the type
58 --> $DIR/cast_lossless_integer.rs:17:13
60 LL | let _ = 1i16 as i32;
61 | ^^^^^^^^^^^ help: try: `i32::from(1i16)`
63 error: casting `i16` to `i64` may become silently lossy if you later change the type
64 --> $DIR/cast_lossless_integer.rs:18:13
66 LL | let _ = 1i16 as i64;
67 | ^^^^^^^^^^^ help: try: `i64::from(1i16)`
69 error: casting `u16` to `i32` may become silently lossy if you later change the type
70 --> $DIR/cast_lossless_integer.rs:19:13
72 LL | let _ = 1u16 as i32;
73 | ^^^^^^^^^^^ help: try: `i32::from(1u16)`
75 error: casting `u16` to `i64` may become silently lossy if you later change the type
76 --> $DIR/cast_lossless_integer.rs:20:13
78 LL | let _ = 1u16 as i64;
79 | ^^^^^^^^^^^ help: try: `i64::from(1u16)`
81 error: casting `u16` to `u32` may become silently lossy if you later change the type
82 --> $DIR/cast_lossless_integer.rs:21:13
84 LL | let _ = 1u16 as u32;
85 | ^^^^^^^^^^^ help: try: `u32::from(1u16)`
87 error: casting `u16` to `u64` may become silently lossy if you later change the type
88 --> $DIR/cast_lossless_integer.rs:22:13
90 LL | let _ = 1u16 as u64;
91 | ^^^^^^^^^^^ help: try: `u64::from(1u16)`
93 error: casting `i32` to `i64` may become silently lossy if you later change the type
94 --> $DIR/cast_lossless_integer.rs:23:13
96 LL | let _ = 1i32 as i64;
97 | ^^^^^^^^^^^ help: try: `i64::from(1i32)`
99 error: casting `u32` to `i64` may become silently lossy if you later change the type
100 --> $DIR/cast_lossless_integer.rs:24:13
102 LL | let _ = 1u32 as i64;
103 | ^^^^^^^^^^^ help: try: `i64::from(1u32)`
105 error: casting `u32` to `u64` may become silently lossy if you later change the type
106 --> $DIR/cast_lossless_integer.rs:25:13
108 LL | let _ = 1u32 as u64;
109 | ^^^^^^^^^^^ help: try: `u64::from(1u32)`
111 error: casting `u8` to `u16` may become silently lossy if you later change the type
112 --> $DIR/cast_lossless_integer.rs:28:13
114 LL | let _ = (1u8 + 1u8) as u16;
115 | ^^^^^^^^^^^^^^^^^^ help: try: `u16::from(1u8 + 1u8)`
117 error: aborting due to 19 previous errors