The Adjust enum in src/librustc/ty/adjustment.rs and the CastKind enum in src/librustc/mir/mod.rs have all fields but one of the CastKind enum in common. We should pull them out into a single enum that both use. Additionally this will allow merging some variants of ExprKind in src/librustc_mir/hair/mod.rs by having a single Coerce variant that has a field of the newly created enum.
The
Adjustenum in src/librustc/ty/adjustment.rs and theCastKindenum in src/librustc/mir/mod.rs have all fields but one of theCastKindenum in common. We should pull them out into a single enum that both use. Additionally this will allow merging some variants of ExprKind in src/librustc_mir/hair/mod.rs by having a singleCoercevariant that has a field of the newly created enum.