1 #![feature(tool_lints)]
3 #[warn(clippy::fn_to_numeric_cast)]
5 fn foo() -> String { String::new() }
7 fn test_function_to_numeric_cast() {
21 // Casting to usize is OK and should not warn
25 fn test_function_var_to_numeric_cast() {
26 let abc: fn() -> String = foo;
41 // Casting to usize is OK and should not warn
45 fn fn_with_fn_args(f: fn(i32) -> i32) -> i32 {