1
1
error: casting function pointer `foo` to `i8`, which truncates the value
2
- --> tests/ui/fn_to_numeric_cast.rs:12 :13
2
+ --> tests/ui/fn_to_numeric_cast.rs:13 :13
3
3
|
4
4
LL | let _ = foo as i8;
5
5
| ^^^^^^^^^ help: try: `foo as usize`
@@ -8,19 +8,19 @@ LL | let _ = foo as i8;
8
8
= help: to override `-D warnings` add `#[allow(clippy::fn_to_numeric_cast_with_truncation)]`
9
9
10
10
error: casting function pointer `foo` to `i16`, which truncates the value
11
- --> tests/ui/fn_to_numeric_cast.rs:14 :13
11
+ --> tests/ui/fn_to_numeric_cast.rs:15 :13
12
12
|
13
13
LL | let _ = foo as i16;
14
14
| ^^^^^^^^^^ help: try: `foo as usize`
15
15
16
16
error: casting function pointer `foo` to `i32`, which truncates the value
17
- --> tests/ui/fn_to_numeric_cast.rs:16 :13
17
+ --> tests/ui/fn_to_numeric_cast.rs:17 :13
18
18
|
19
19
LL | let _ = foo as i32;
20
20
| ^^^^^^^^^^ help: try: `foo as usize`
21
21
22
22
error: casting function pointer `foo` to `i64`
23
- --> tests/ui/fn_to_numeric_cast.rs:19 :13
23
+ --> tests/ui/fn_to_numeric_cast.rs:20 :13
24
24
|
25
25
LL | let _ = foo as i64;
26
26
| ^^^^^^^^^^ help: try: `foo as usize`
@@ -29,115 +29,115 @@ LL | let _ = foo as i64;
29
29
= help: to override `-D warnings` add `#[allow(clippy::fn_to_numeric_cast)]`
30
30
31
31
error: casting function pointer `foo` to `i128`
32
- --> tests/ui/fn_to_numeric_cast.rs:21 :13
32
+ --> tests/ui/fn_to_numeric_cast.rs:22 :13
33
33
|
34
34
LL | let _ = foo as i128;
35
35
| ^^^^^^^^^^^ help: try: `foo as usize`
36
36
37
37
error: casting function pointer `foo` to `isize`
38
- --> tests/ui/fn_to_numeric_cast.rs:23 :13
38
+ --> tests/ui/fn_to_numeric_cast.rs:24 :13
39
39
|
40
40
LL | let _ = foo as isize;
41
41
| ^^^^^^^^^^^^ help: try: `foo as usize`
42
42
43
43
error: casting function pointer `foo` to `u8`, which truncates the value
44
- --> tests/ui/fn_to_numeric_cast.rs:26 :13
44
+ --> tests/ui/fn_to_numeric_cast.rs:27 :13
45
45
|
46
46
LL | let _ = foo as u8;
47
47
| ^^^^^^^^^ help: try: `foo as usize`
48
48
49
49
error: casting function pointer `foo` to `u16`, which truncates the value
50
- --> tests/ui/fn_to_numeric_cast.rs:28 :13
50
+ --> tests/ui/fn_to_numeric_cast.rs:29 :13
51
51
|
52
52
LL | let _ = foo as u16;
53
53
| ^^^^^^^^^^ help: try: `foo as usize`
54
54
55
55
error: casting function pointer `foo` to `u32`, which truncates the value
56
- --> tests/ui/fn_to_numeric_cast.rs:30 :13
56
+ --> tests/ui/fn_to_numeric_cast.rs:31 :13
57
57
|
58
58
LL | let _ = foo as u32;
59
59
| ^^^^^^^^^^ help: try: `foo as usize`
60
60
61
61
error: casting function pointer `foo` to `u64`
62
- --> tests/ui/fn_to_numeric_cast.rs:33 :13
62
+ --> tests/ui/fn_to_numeric_cast.rs:34 :13
63
63
|
64
64
LL | let _ = foo as u64;
65
65
| ^^^^^^^^^^ help: try: `foo as usize`
66
66
67
67
error: casting function pointer `foo` to `u128`
68
- --> tests/ui/fn_to_numeric_cast.rs:35 :13
68
+ --> tests/ui/fn_to_numeric_cast.rs:36 :13
69
69
|
70
70
LL | let _ = foo as u128;
71
71
| ^^^^^^^^^^^ help: try: `foo as usize`
72
72
73
73
error: casting function pointer `abc` to `i8`, which truncates the value
74
- --> tests/ui/fn_to_numeric_cast.rs:49 :13
74
+ --> tests/ui/fn_to_numeric_cast.rs:50 :13
75
75
|
76
76
LL | let _ = abc as i8;
77
77
| ^^^^^^^^^ help: try: `abc as usize`
78
78
79
79
error: casting function pointer `abc` to `i16`, which truncates the value
80
- --> tests/ui/fn_to_numeric_cast.rs:51 :13
80
+ --> tests/ui/fn_to_numeric_cast.rs:52 :13
81
81
|
82
82
LL | let _ = abc as i16;
83
83
| ^^^^^^^^^^ help: try: `abc as usize`
84
84
85
85
error: casting function pointer `abc` to `i32`, which truncates the value
86
- --> tests/ui/fn_to_numeric_cast.rs:53 :13
86
+ --> tests/ui/fn_to_numeric_cast.rs:54 :13
87
87
|
88
88
LL | let _ = abc as i32;
89
89
| ^^^^^^^^^^ help: try: `abc as usize`
90
90
91
91
error: casting function pointer `abc` to `i64`
92
- --> tests/ui/fn_to_numeric_cast.rs:56 :13
92
+ --> tests/ui/fn_to_numeric_cast.rs:57 :13
93
93
|
94
94
LL | let _ = abc as i64;
95
95
| ^^^^^^^^^^ help: try: `abc as usize`
96
96
97
97
error: casting function pointer `abc` to `i128`
98
- --> tests/ui/fn_to_numeric_cast.rs:58 :13
98
+ --> tests/ui/fn_to_numeric_cast.rs:59 :13
99
99
|
100
100
LL | let _ = abc as i128;
101
101
| ^^^^^^^^^^^ help: try: `abc as usize`
102
102
103
103
error: casting function pointer `abc` to `isize`
104
- --> tests/ui/fn_to_numeric_cast.rs:60 :13
104
+ --> tests/ui/fn_to_numeric_cast.rs:61 :13
105
105
|
106
106
LL | let _ = abc as isize;
107
107
| ^^^^^^^^^^^^ help: try: `abc as usize`
108
108
109
109
error: casting function pointer `abc` to `u8`, which truncates the value
110
- --> tests/ui/fn_to_numeric_cast.rs:63 :13
110
+ --> tests/ui/fn_to_numeric_cast.rs:64 :13
111
111
|
112
112
LL | let _ = abc as u8;
113
113
| ^^^^^^^^^ help: try: `abc as usize`
114
114
115
115
error: casting function pointer `abc` to `u16`, which truncates the value
116
- --> tests/ui/fn_to_numeric_cast.rs:65 :13
116
+ --> tests/ui/fn_to_numeric_cast.rs:66 :13
117
117
|
118
118
LL | let _ = abc as u16;
119
119
| ^^^^^^^^^^ help: try: `abc as usize`
120
120
121
121
error: casting function pointer `abc` to `u32`, which truncates the value
122
- --> tests/ui/fn_to_numeric_cast.rs:67 :13
122
+ --> tests/ui/fn_to_numeric_cast.rs:68 :13
123
123
|
124
124
LL | let _ = abc as u32;
125
125
| ^^^^^^^^^^ help: try: `abc as usize`
126
126
127
127
error: casting function pointer `abc` to `u64`
128
- --> tests/ui/fn_to_numeric_cast.rs:70 :13
128
+ --> tests/ui/fn_to_numeric_cast.rs:71 :13
129
129
|
130
130
LL | let _ = abc as u64;
131
131
| ^^^^^^^^^^ help: try: `abc as usize`
132
132
133
133
error: casting function pointer `abc` to `u128`
134
- --> tests/ui/fn_to_numeric_cast.rs:72 :13
134
+ --> tests/ui/fn_to_numeric_cast.rs:73 :13
135
135
|
136
136
LL | let _ = abc as u128;
137
137
| ^^^^^^^^^^^ help: try: `abc as usize`
138
138
139
139
error: casting function pointer `f` to `i32`, which truncates the value
140
- --> tests/ui/fn_to_numeric_cast.rs:80 :5
140
+ --> tests/ui/fn_to_numeric_cast.rs:81 :5
141
141
|
142
142
LL | f as i32
143
143
| ^^^^^^^^ help: try: `f as usize`
0 commit comments