]> git.lizzy.rs Git - rust.git/blob - tests/ui/cast_lossless_integer.stderr
iterate List by value
[rust.git] / tests / ui / cast_lossless_integer.stderr
1 error: casting `i8` to `i16` may become silently lossy if you later change the type
2   --> $DIR/cast_lossless_integer.rs:8:5
3    |
4 LL |     1i8 as i16;
5    |     ^^^^^^^^^^ help: try: `i16::from(1i8)`
6    |
7    = note: `-D clippy::cast-lossless` implied by `-D warnings`
8
9 error: casting `i8` to `i32` may become silently lossy if you later change the type
10   --> $DIR/cast_lossless_integer.rs:9:5
11    |
12 LL |     1i8 as i32;
13    |     ^^^^^^^^^^ help: try: `i32::from(1i8)`
14
15 error: casting `i8` to `i64` may become silently lossy if you later change the type
16   --> $DIR/cast_lossless_integer.rs:10:5
17    |
18 LL |     1i8 as i64;
19    |     ^^^^^^^^^^ help: try: `i64::from(1i8)`
20
21 error: casting `u8` to `i16` may become silently lossy if you later change the type
22   --> $DIR/cast_lossless_integer.rs:11:5
23    |
24 LL |     1u8 as i16;
25    |     ^^^^^^^^^^ help: try: `i16::from(1u8)`
26
27 error: casting `u8` to `i32` may become silently lossy if you later change the type
28   --> $DIR/cast_lossless_integer.rs:12:5
29    |
30 LL |     1u8 as i32;
31    |     ^^^^^^^^^^ help: try: `i32::from(1u8)`
32
33 error: casting `u8` to `i64` may become silently lossy if you later change the type
34   --> $DIR/cast_lossless_integer.rs:13:5
35    |
36 LL |     1u8 as i64;
37    |     ^^^^^^^^^^ help: try: `i64::from(1u8)`
38
39 error: casting `u8` to `u16` may become silently lossy if you later change the type
40   --> $DIR/cast_lossless_integer.rs:14:5
41    |
42 LL |     1u8 as u16;
43    |     ^^^^^^^^^^ help: try: `u16::from(1u8)`
44
45 error: casting `u8` to `u32` may become silently lossy if you later change the type
46   --> $DIR/cast_lossless_integer.rs:15:5
47    |
48 LL |     1u8 as u32;
49    |     ^^^^^^^^^^ help: try: `u32::from(1u8)`
50
51 error: casting `u8` to `u64` may become silently lossy if you later change the type
52   --> $DIR/cast_lossless_integer.rs:16:5
53    |
54 LL |     1u8 as u64;
55    |     ^^^^^^^^^^ help: try: `u64::from(1u8)`
56
57 error: casting `i16` to `i32` may become silently lossy if you later change the type
58   --> $DIR/cast_lossless_integer.rs:17:5
59    |
60 LL |     1i16 as i32;
61    |     ^^^^^^^^^^^ help: try: `i32::from(1i16)`
62
63 error: casting `i16` to `i64` may become silently lossy if you later change the type
64   --> $DIR/cast_lossless_integer.rs:18:5
65    |
66 LL |     1i16 as i64;
67    |     ^^^^^^^^^^^ help: try: `i64::from(1i16)`
68
69 error: casting `u16` to `i32` may become silently lossy if you later change the type
70   --> $DIR/cast_lossless_integer.rs:19:5
71    |
72 LL |     1u16 as i32;
73    |     ^^^^^^^^^^^ help: try: `i32::from(1u16)`
74
75 error: casting `u16` to `i64` may become silently lossy if you later change the type
76   --> $DIR/cast_lossless_integer.rs:20:5
77    |
78 LL |     1u16 as i64;
79    |     ^^^^^^^^^^^ help: try: `i64::from(1u16)`
80
81 error: casting `u16` to `u32` may become silently lossy if you later change the type
82   --> $DIR/cast_lossless_integer.rs:21:5
83    |
84 LL |     1u16 as u32;
85    |     ^^^^^^^^^^^ help: try: `u32::from(1u16)`
86
87 error: casting `u16` to `u64` may become silently lossy if you later change the type
88   --> $DIR/cast_lossless_integer.rs:22:5
89    |
90 LL |     1u16 as u64;
91    |     ^^^^^^^^^^^ help: try: `u64::from(1u16)`
92
93 error: casting `i32` to `i64` may become silently lossy if you later change the type
94   --> $DIR/cast_lossless_integer.rs:23:5
95    |
96 LL |     1i32 as i64;
97    |     ^^^^^^^^^^^ help: try: `i64::from(1i32)`
98
99 error: casting `u32` to `i64` may become silently lossy if you later change the type
100   --> $DIR/cast_lossless_integer.rs:24:5
101    |
102 LL |     1u32 as i64;
103    |     ^^^^^^^^^^^ help: try: `i64::from(1u32)`
104
105 error: casting `u32` to `u64` may become silently lossy if you later change the type
106   --> $DIR/cast_lossless_integer.rs:25:5
107    |
108 LL |     1u32 as u64;
109    |     ^^^^^^^^^^^ help: try: `u64::from(1u32)`
110
111 error: casting `u8` to `u16` may become silently lossy if you later change the type
112   --> $DIR/cast_lossless_integer.rs:28:5
113    |
114 LL |     (1u8 + 1u8) as u16;
115    |     ^^^^^^^^^^^^^^^^^^ help: try: `u16::from(1u8 + 1u8)`
116
117 error: aborting due to 19 previous errors
118