Skip to content

Internal Tracking Issue for the AliasTerm refactor #156181

@lcnr

Description

@lcnr

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 DefId of type aliases into AliasTyKind ty::Alias refactor #154758
  • do the same for constants, updating AliasTerm AliasTerm refactor #155392
  • Use special DefIds for aliases #155981
  • merge AliasTy and AliasTerm and have a single Alias type generic over the kind.
  • remove AliasTerm::def_id() and AliasTy::def_id as not all variants will ahve DefIds in the future, instead track the current variant more explicitly
    • TypeError use more specific DefIds, requires change to Relate impl of AliasTy
  • replace uses of tcx.mk_ty_from_kind with calls to a more specific constructor method

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCT-typesRelevant to the types team, which will review and decide on the PR/issue.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions