rust-lang / types-team

Home of the "types team", affiliated with the compiler and lang teams.
https://rust-lang.github.io/types-team/
Apache License 2.0
94 stars 19 forks source link

Type system refactorings for further `rustc_type_ir`-ification #124

Closed compiler-errors closed 9 months ago

compiler-errors commented 10 months ago

Proposal

I propose the following changes that will have a large footprint, but will ultimately simplify rustc_type_ir migration:

  1. Get rid of TypeAndMut and just have the tykind variant be RawPtr(Ty, Mutability), like how refs are just Ref(Region, Ty, Mutability).

  2. Remove the type system's dependency on hir::Mutability and hir::Movability and copy both of these enums into rustc_type_ir (will require converting between hir::Mutability and ty::Mutability during astconv).

Mentors or Reviewers

I'll make the changes.

Process

The main points of the Major Change Process are as follows:

You can read more about Major Change Proposals on forge.

Comments

This issue is not meant to be used for technical discussion. There is a Zulip stream for that. Use this issue to leave procedural comments, such as volunteering to review, indicating that you second the proposal (or third, etc), or raising a concern that you would like to be addressed.

rustbot commented 10 months ago

This issue is not meant to be used for technical discussion. There is a Zulip stream for that. Use this issue to leave procedural comments, such as volunteering to review, indicating that you second the proposal (or third, etc), or raising a concern that you would like to be addressed.

cc @rust-lang/types

jackh726 commented 10 months ago

@rustbot second

jackh726 commented 9 months ago

Closing as accepted.