Closed
Description
The only difference between the two is that "fresh" variables (a predecessor of the "canonical query" system) are considered needs_infer
, despite not really taking part in inference.
I think that even without changing/replacing the "freshening" system at all, we can make "fresh" variables not needs_infer
, removing the need for TypeFlags::KEEP_IN_LOCAL_TCX
and has_local_value
(which only existed for the 'gcx
vs 'tcx
split anyway).
If we want to be more explicit, we could rename needs_infer
to is_local_to_inference_context
or something similar, but either way I think it makes more sense than "local value".
cc @nikomatsakis @matthewjasper @Zoxc
This issue has been assigned to @lcnr via this comment.