/// Returns `Some` for integral/pointer casts.
/// casts like unsizing casts will return `None`
pub fn from_ty(t: Ty<'tcx>) -> Option<CastTy<'tcx>> {
- match t.sty {
+ match t.kind {
ty::Bool => Some(CastTy::Int(IntTy::Bool)),
ty::Char => Some(CastTy::Int(IntTy::Char)),
ty::Int(_) => Some(CastTy::Int(IntTy::I)),