Skip to main content

merge_fn_types

Function merge_fn_types 

Source
pub fn merge_fn_types(types: &[DataType]) -> Option<DataType>
Expand description

The one function type that holds every type in types, where more than one function can land in the same position.

A position every function in it agrees on stays pinned to that function, so a list of one closure and a call through it resolve at compile time exactly as they did. Two different functions make the position a function value: no function is the one it holds, so the call dispatches on what the value carries. None where the types name no function, which leaves the position to the ordinary rules.