canonicalizating placeholders should ignore their `bound_var`
Open
@lcnr is already working on this.
Since May 23, 2025.
C-cleanup
T-types
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.