What enables a closure type to be used where a function pointer type to be used?
fn takes_ptr(_f: fn(u32) -> u32) {}
fn main() {
let closure = |n| n;
takes_ptr(closure)
}
related: there's another question that asks what enables pointer types to be used where closure types are expected: What enables a function trait type to be used where an fn type is expected?