Open
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.