Skip to content

Replace calls to has_local_value with needs_infer. #70285

Closed
@eddyb

Description

@eddyb

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.

Metadata

Metadata

Assignees

Labels

A-type-systemArea: Type systemC-cleanupCategory: PRs that clean code up or issues documenting cleanup.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions