fn foo() {}
fn bar() {}
let a = match true {
true => foo,
false => bar,
};
Here we wind up with a LUB coercion between two different function item types. This succeeds by coercing both types to function pointers.
The current documentation for type coercions defines LUB coercions as simply trying one-to-one coercion both ways and then trying to compute a mutual supertype if that fails. It should also document that when we have a LUB coercion between function item types and closures we'll coerce to a function pointer if there's no mutual supertype.