2 Checks for casts of a function pointer to a numeric type not wide enough to
6 Such a cast discards some bits of the function's address. If this is intended, it would be more
7 clearly expressed by casting to usize first, then casting the usize to the intended type (with
8 a comment) to perform the truncation.
20 // Cast to usize first, then comment with the reason for the truncation
24 let fn_ptr = fn1 as usize;
25 let fn_ptr_truncated = fn_ptr as i32;