Allow PartialStruct on inference edges (#36521)
* Allow PartialStruct on inference edges
At the moment, we only allow types, or completely Const inference
results to propagate along inference edges. In particular PartialStruct
is disallowed. I noticed some inference sub-optimalities as a result
(e.g. in iterating `Pair`), but more generally, I would prefer if
adding an additional return value somewhere (i.e. returning a tuple
of two values, rather than a single value) would not degrade the
inference precision for the previously returned value. This fixes
the issue by allowing `PartialStruct` to propagate along inference
edges.
* Make sure to widenconst in return_type_tfunc