2018-10-05 05:49:08 +00:00
|
|
|
error: casting function pointer `foo` to `i8`, which truncates the value
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/fn_to_numeric_cast.rs:19:13
|
|
|
|
|
|
|
|
|
19 | let _ = foo as i8;
|
|
|
|
| ^^^^^^^^^ help: try: `foo as usize`
|
|
|
|
|
|
|
|
|
= note: `-D clippy::fn-to-numeric-cast-with-truncation` implied by `-D warnings`
|
2018-10-04 19:44:16 +00:00
|
|
|
|
2018-10-05 05:49:08 +00:00
|
|
|
error: casting function pointer `foo` to `i16`, which truncates the value
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/fn_to_numeric_cast.rs:20:13
|
2018-10-04 19:44:16 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
20 | let _ = foo as i16;
|
2018-10-04 19:44:16 +00:00
|
|
|
| ^^^^^^^^^^ help: try: `foo as usize`
|
|
|
|
|
2018-10-05 05:49:08 +00:00
|
|
|
error: casting function pointer `foo` to `i32`, which truncates the value
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/fn_to_numeric_cast.rs:21:13
|
2018-10-04 19:44:16 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
21 | let _ = foo as i32;
|
2018-10-04 19:44:16 +00:00
|
|
|
| ^^^^^^^^^^ help: try: `foo as usize`
|
|
|
|
|
2018-10-05 05:49:08 +00:00
|
|
|
error: casting function pointer `foo` to `i64`
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/fn_to_numeric_cast.rs:22:13
|
2018-10-04 19:44:16 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
22 | let _ = foo as i64;
|
2018-10-05 05:49:08 +00:00
|
|
|
| ^^^^^^^^^^ help: try: `foo as usize`
|
|
|
|
|
|
|
|
|
= note: `-D clippy::fn-to-numeric-cast` implied by `-D warnings`
|
|
|
|
|
|
|
|
error: casting function pointer `foo` to `i128`
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/fn_to_numeric_cast.rs:23:13
|
2018-10-05 05:49:08 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
23 | let _ = foo as i128;
|
2018-10-04 19:44:16 +00:00
|
|
|
| ^^^^^^^^^^^ help: try: `foo as usize`
|
|
|
|
|
|
|
|
error: casting function pointer `foo` to `isize`
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/fn_to_numeric_cast.rs:24:13
|
2018-10-04 19:44:16 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
24 | let _ = foo as isize;
|
2018-10-04 19:44:16 +00:00
|
|
|
| ^^^^^^^^^^^^ help: try: `foo as usize`
|
|
|
|
|
2018-10-05 05:49:08 +00:00
|
|
|
error: casting function pointer `foo` to `u8`, which truncates the value
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/fn_to_numeric_cast.rs:26:13
|
2018-10-04 19:44:16 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
26 | let _ = foo as u8;
|
2018-10-04 19:44:16 +00:00
|
|
|
| ^^^^^^^^^ help: try: `foo as usize`
|
|
|
|
|
2018-10-05 05:49:08 +00:00
|
|
|
error: casting function pointer `foo` to `u16`, which truncates the value
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/fn_to_numeric_cast.rs:27:13
|
2018-10-04 19:44:16 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
27 | let _ = foo as u16;
|
2018-10-04 19:44:16 +00:00
|
|
|
| ^^^^^^^^^^ help: try: `foo as usize`
|
|
|
|
|
2018-10-05 05:49:08 +00:00
|
|
|
error: casting function pointer `foo` to `u32`, which truncates the value
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/fn_to_numeric_cast.rs:28:13
|
2018-10-04 19:44:16 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
28 | let _ = foo as u32;
|
2018-10-04 19:44:16 +00:00
|
|
|
| ^^^^^^^^^^ help: try: `foo as usize`
|
|
|
|
|
|
|
|
error: casting function pointer `foo` to `u64`
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/fn_to_numeric_cast.rs:29:13
|
2018-10-04 19:44:16 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
29 | let _ = foo as u64;
|
2018-10-04 19:44:16 +00:00
|
|
|
| ^^^^^^^^^^ help: try: `foo as usize`
|
|
|
|
|
|
|
|
error: casting function pointer `foo` to `u128`
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/fn_to_numeric_cast.rs:30:13
|
2018-10-04 19:44:16 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
30 | let _ = foo as u128;
|
2018-10-04 19:44:16 +00:00
|
|
|
| ^^^^^^^^^^^ help: try: `foo as usize`
|
|
|
|
|
2018-10-05 05:49:08 +00:00
|
|
|
error: casting function pointer `abc` to `i8`, which truncates the value
|
2018-10-07 10:18:40 +00:00
|
|
|
--> $DIR/fn_to_numeric_cast.rs:43:13
|
2018-10-04 19:44:16 +00:00
|
|
|
|
|
2018-10-07 10:18:40 +00:00
|
|
|
43 | let _ = abc as i8;
|
2018-10-04 19:44:16 +00:00
|
|
|
| ^^^^^^^^^ help: try: `abc as usize`
|
|
|
|
|
2018-10-05 05:49:08 +00:00
|
|
|
error: casting function pointer `abc` to `i16`, which truncates the value
|
2018-10-07 10:18:40 +00:00
|
|
|
--> $DIR/fn_to_numeric_cast.rs:44:13
|
2018-10-04 19:44:16 +00:00
|
|
|
|
|
2018-10-07 10:18:40 +00:00
|
|
|
44 | let _ = abc as i16;
|
2018-10-04 19:44:16 +00:00
|
|
|
| ^^^^^^^^^^ help: try: `abc as usize`
|
|
|
|
|
2018-10-05 05:49:08 +00:00
|
|
|
error: casting function pointer `abc` to `i32`, which truncates the value
|
2018-10-07 10:18:40 +00:00
|
|
|
--> $DIR/fn_to_numeric_cast.rs:45:13
|
2018-10-04 19:44:16 +00:00
|
|
|
|
|
2018-10-07 10:18:40 +00:00
|
|
|
45 | let _ = abc as i32;
|
2018-10-04 19:44:16 +00:00
|
|
|
| ^^^^^^^^^^ help: try: `abc as usize`
|
|
|
|
|
|
|
|
error: casting function pointer `abc` to `i64`
|
2018-10-07 10:18:40 +00:00
|
|
|
--> $DIR/fn_to_numeric_cast.rs:46:13
|
2018-10-04 19:44:16 +00:00
|
|
|
|
|
2018-10-07 10:18:40 +00:00
|
|
|
46 | let _ = abc as i64;
|
2018-10-04 19:44:16 +00:00
|
|
|
| ^^^^^^^^^^ help: try: `abc as usize`
|
|
|
|
|
|
|
|
error: casting function pointer `abc` to `i128`
|
2018-10-07 10:18:40 +00:00
|
|
|
--> $DIR/fn_to_numeric_cast.rs:47:13
|
2018-10-04 19:44:16 +00:00
|
|
|
|
|
2018-10-07 10:18:40 +00:00
|
|
|
47 | let _ = abc as i128;
|
2018-10-04 19:44:16 +00:00
|
|
|
| ^^^^^^^^^^^ help: try: `abc as usize`
|
|
|
|
|
|
|
|
error: casting function pointer `abc` to `isize`
|
2018-10-07 10:18:40 +00:00
|
|
|
--> $DIR/fn_to_numeric_cast.rs:48:13
|
2018-10-04 19:44:16 +00:00
|
|
|
|
|
2018-10-07 10:18:40 +00:00
|
|
|
48 | let _ = abc as isize;
|
2018-10-04 19:44:16 +00:00
|
|
|
| ^^^^^^^^^^^^ help: try: `abc as usize`
|
|
|
|
|
2018-10-05 05:49:08 +00:00
|
|
|
error: casting function pointer `abc` to `u8`, which truncates the value
|
2018-10-07 10:18:40 +00:00
|
|
|
--> $DIR/fn_to_numeric_cast.rs:50:13
|
2018-10-04 19:44:16 +00:00
|
|
|
|
|
2018-10-07 10:18:40 +00:00
|
|
|
50 | let _ = abc as u8;
|
2018-10-04 19:44:16 +00:00
|
|
|
| ^^^^^^^^^ help: try: `abc as usize`
|
|
|
|
|
2018-10-05 05:49:08 +00:00
|
|
|
error: casting function pointer `abc` to `u16`, which truncates the value
|
2018-10-07 10:18:40 +00:00
|
|
|
--> $DIR/fn_to_numeric_cast.rs:51:13
|
2018-10-04 19:44:16 +00:00
|
|
|
|
|
2018-10-07 10:18:40 +00:00
|
|
|
51 | let _ = abc as u16;
|
2018-10-04 19:44:16 +00:00
|
|
|
| ^^^^^^^^^^ help: try: `abc as usize`
|
|
|
|
|
2018-10-05 05:49:08 +00:00
|
|
|
error: casting function pointer `abc` to `u32`, which truncates the value
|
2018-10-07 10:18:40 +00:00
|
|
|
--> $DIR/fn_to_numeric_cast.rs:52:13
|
2018-10-04 19:44:16 +00:00
|
|
|
|
|
2018-10-07 10:18:40 +00:00
|
|
|
52 | let _ = abc as u32;
|
2018-10-04 19:44:16 +00:00
|
|
|
| ^^^^^^^^^^ help: try: `abc as usize`
|
|
|
|
|
|
|
|
error: casting function pointer `abc` to `u64`
|
2018-10-07 10:18:40 +00:00
|
|
|
--> $DIR/fn_to_numeric_cast.rs:53:13
|
2018-10-04 19:44:16 +00:00
|
|
|
|
|
2018-10-07 10:18:40 +00:00
|
|
|
53 | let _ = abc as u64;
|
2018-10-04 19:44:16 +00:00
|
|
|
| ^^^^^^^^^^ help: try: `abc as usize`
|
|
|
|
|
|
|
|
error: casting function pointer `abc` to `u128`
|
2018-10-07 10:18:40 +00:00
|
|
|
--> $DIR/fn_to_numeric_cast.rs:54:13
|
2018-10-04 19:44:16 +00:00
|
|
|
|
|
2018-10-07 10:18:40 +00:00
|
|
|
54 | let _ = abc as u128;
|
2018-10-04 19:44:16 +00:00
|
|
|
| ^^^^^^^^^^^ help: try: `abc as usize`
|
|
|
|
|
2018-10-05 05:49:08 +00:00
|
|
|
error: casting function pointer `f` to `i32`, which truncates the value
|
2018-10-07 10:18:40 +00:00
|
|
|
--> $DIR/fn_to_numeric_cast.rs:61:5
|
2018-10-04 19:44:16 +00:00
|
|
|
|
|
2018-10-07 10:18:40 +00:00
|
|
|
61 | f as i32
|
2018-10-04 19:44:16 +00:00
|
|
|
| ^^^^^^^^ help: try: `f as usize`
|
|
|
|
|
|
|
|
error: aborting due to 23 previous errors
|
|
|
|
|