pub fn expr_type_is_certain(cx: &LateContext<'_>, expr: &Expr<'_>) -> boolExpand description
A heuristic to tell whether an expression’s type can be determined purely from its subexpressions, and the arguments and locals they use. Put another way, this function tries to tell whether an expression’s type can be determined without appeal to the surrounding context.
This is, in some sense, a counterpart to let_unit_value’s expr_needs_inferred_result.
Intuitively, that function determines whether an expression’s type is needed for type inference,
whereas this function determines whether type inference is needed for an expression’s
type.
As a heuristic, this may produce false negatives, but a false positive should be considered a bug.