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.
For at least some QPath::TypeRelative, the path segmentโs res can be Res::Err.
update_res tries to fix the resolution when parent_certainty is Certain(Some(..)).