Internal Tracking Issue for the `AliasTerm` refactor
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
This is a tracking issue for a refactoring of the way aliases are represented in the type system.
About tracking issues
Tracking issues are used to record the overall progress of implementation.
They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions.
A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature.
Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.
Discussion comments will get marked as off-topic or deleted.
Repeated discussions on the tracking issue may lead to the tracking issue getting locked.
Steps
- move
DefIdof type aliases intoAliasTyKindhttps://github.com/rust-lang/rust/pull/154758 - do the same for constants, updating
AliasTermhttps://github.com/rust-lang/rust/pull/155392 - https://github.com/rust-lang/rust/pull/155981
- merge
AliasTyandAliasTermand have a singleAliastype generic over the kind. - remove
AliasTerm::def_id()andAliasTy::def_idas not all variants will ahveDefIds in the future, instead track the current variant more explicitly-
TypeErroruse more specificDefIds, requires change toRelateimpl ofAliasTy
-
- replace uses of
tcx.mk_ty_from_kindwith calls to a more specific constructor method
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.
Research direction
No files or tests are named. Start by reviewing the unchecked checklist items and the linked pull requests for the completed AliasTerm changes, then trace the remaining TypeError and mk_ty_from_kind work in the compiler. Done means the specific constructor replacement is complete and TypeError uses the more specific DefIds described by the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100