|
| 1 | +error: casting function pointer `foo` to `i8` |
| 2 | + --> $DIR/fn_to_numeric_cast_any.rs:19:13 |
| 3 | + | |
| 4 | +LL | let _ = foo as i8; |
| 5 | + | ^^^^^^^^^ help: try: `foo() as i8` |
| 6 | + | |
| 7 | + = note: `-D clippy::fn-to-numeric-cast-any` implied by `-D warnings` |
| 8 | + |
| 9 | +error: casting function pointer `foo` to `i16` |
| 10 | + --> $DIR/fn_to_numeric_cast_any.rs:20:13 |
| 11 | + | |
| 12 | +LL | let _ = foo as i16; |
| 13 | + | ^^^^^^^^^^ help: try: `foo() as i16` |
| 14 | + |
| 15 | +error: casting function pointer `foo` to `i32` |
| 16 | + --> $DIR/fn_to_numeric_cast_any.rs:21:13 |
| 17 | + | |
| 18 | +LL | let _ = foo as i32; |
| 19 | + | ^^^^^^^^^^ help: try: `foo() as i32` |
| 20 | + |
| 21 | +error: casting function pointer `foo` to `i64` |
| 22 | + --> $DIR/fn_to_numeric_cast_any.rs:22:13 |
| 23 | + | |
| 24 | +LL | let _ = foo as i64; |
| 25 | + | ^^^^^^^^^^ help: try: `foo() as i64` |
| 26 | + |
| 27 | +error: casting function pointer `foo` to `i128` |
| 28 | + --> $DIR/fn_to_numeric_cast_any.rs:23:13 |
| 29 | + | |
| 30 | +LL | let _ = foo as i128; |
| 31 | + | ^^^^^^^^^^^ help: try: `foo() as i128` |
| 32 | + |
| 33 | +error: casting function pointer `foo` to `isize` |
| 34 | + --> $DIR/fn_to_numeric_cast_any.rs:24:13 |
| 35 | + | |
| 36 | +LL | let _ = foo as isize; |
| 37 | + | ^^^^^^^^^^^^ help: try: `foo() as isize` |
| 38 | + |
| 39 | +error: casting function pointer `foo` to `u8` |
| 40 | + --> $DIR/fn_to_numeric_cast_any.rs:26:13 |
| 41 | + | |
| 42 | +LL | let _ = foo as u8; |
| 43 | + | ^^^^^^^^^ help: try: `foo() as u8` |
| 44 | + |
| 45 | +error: casting function pointer `foo` to `u16` |
| 46 | + --> $DIR/fn_to_numeric_cast_any.rs:27:13 |
| 47 | + | |
| 48 | +LL | let _ = foo as u16; |
| 49 | + | ^^^^^^^^^^ help: try: `foo() as u16` |
| 50 | + |
| 51 | +error: casting function pointer `foo` to `u32` |
| 52 | + --> $DIR/fn_to_numeric_cast_any.rs:28:13 |
| 53 | + | |
| 54 | +LL | let _ = foo as u32; |
| 55 | + | ^^^^^^^^^^ help: try: `foo() as u32` |
| 56 | + |
| 57 | +error: casting function pointer `foo` to `u64` |
| 58 | + --> $DIR/fn_to_numeric_cast_any.rs:29:13 |
| 59 | + | |
| 60 | +LL | let _ = foo as u64; |
| 61 | + | ^^^^^^^^^^ help: try: `foo() as u64` |
| 62 | + |
| 63 | +error: casting function pointer `foo` to `u128` |
| 64 | + --> $DIR/fn_to_numeric_cast_any.rs:30:13 |
| 65 | + | |
| 66 | +LL | let _ = foo as u128; |
| 67 | + | ^^^^^^^^^^^ help: try: `foo() as u128` |
| 68 | + |
| 69 | +error: casting function pointer `foo` to `usize` |
| 70 | + --> $DIR/fn_to_numeric_cast_any.rs:31:13 |
| 71 | + | |
| 72 | +LL | let _ = foo as usize; |
| 73 | + | ^^^^^^^^^^^^ help: try: `foo() as usize` |
| 74 | + |
| 75 | +error: casting function pointer `Struct::static_method` to `usize` |
| 76 | + --> $DIR/fn_to_numeric_cast_any.rs:39:13 |
| 77 | + | |
| 78 | +LL | let _ = Struct::static_method as usize; |
| 79 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Struct::static_method() as usize` |
| 80 | + |
| 81 | +error: casting function pointer `f` to `usize` |
| 82 | + --> $DIR/fn_to_numeric_cast_any.rs:43:5 |
| 83 | + | |
| 84 | +LL | f as usize |
| 85 | + | ^^^^^^^^^^ help: try: `f() as usize` |
| 86 | + |
| 87 | +error: casting function pointer `T::static_method` to `usize` |
| 88 | + --> $DIR/fn_to_numeric_cast_any.rs:47:5 |
| 89 | + | |
| 90 | +LL | T::static_method as usize |
| 91 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `T::static_method() as usize` |
| 92 | + |
| 93 | +error: aborting due to 15 previous errors |
| 94 | + |
0 commit comments