Skip to content

canonicalizating placeholders should ignore their bound_var #141428

Open
@lcnr

Description

@lcnr

Given an instantiated binder for<'a, 'b, 'c>, the goals

  • T: Trait<'!a, '!b>
  • T: Trait<'!b, '!c>
  • T: Trait<'!b, '!a>

should all result in the same canonical input. They currently do not, as we simply reuse the bound_var of the placeholder in the caller as the bound_var of the placeholder in the canonical. This only impacts perf and at least for now, is likely not too relevant.

Concretely, CanonicalVarKind should only store the universe of placeholder vars and instantiating a canonical should be responsible for giving each placeholder a unique bound var.

Metadata

Metadata

Assignees

Labels

C-cleanupCategory: PRs that clean code up or issues documenting cleanup.T-typesRelevant to the types 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