-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-MIRArea: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.htmlArea: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.htmlA-technical-debtArea: Internal cleanup workArea: Internal cleanup workC-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
Currently, our classification of casts is kind of a mess:
- We have
mir::CastKind
, but it has aMisc
variant and most casts fall in that category (this is what ends up in the MIR). - We also have
ty::cast::CastKind
that has a seemingly independent classification (no idea where this is used). - We have a
CastTy
type, but can it really represent all types in a cast? If yes, I'd expect to seeunwrap
s around here. - In
thir::ExprKind
, we haveCast
andPointer
expressions, the latter also being casts.
I don't know how these all relate, but it looks like some cleanup is dearly necessary here.
Metadata
Metadata
Assignees
Labels
A-MIRArea: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.htmlArea: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.htmlA-technical-debtArea: Internal cleanup workArea: Internal cleanup workC-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.