3 #![warn(clippy::fn_to_numeric_cast, clippy::fn_to_numeric_cast_with_truncation)]
9 fn test_function_to_numeric_cast() {
23 // Casting to usize is OK and should not warn
26 // Cast `f` (a `FnDef`) to `fn()` should not warn
31 fn test_function_var_to_numeric_cast() {
32 let abc: fn() -> String = foo;
47 // Casting to usize is OK and should not warn
51 fn fn_with_fn_args(f: fn(i32) -> i32) -> i32 {