X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Flibrustc%2Fty%2Fcast.rs;h=bc12412312debcb100a70d0d5f0cbd9bcfb4bdf2;hb=ae2a720e92f78e76db5b7c1d6308fcd87d5c5281;hp=7ea5c73c5b749b9803cf53617e6b2e27946286ec;hpb=d84e063506537637388a0e4f84d74df4599534e8;p=rust.git diff --git a/src/librustc/ty/cast.rs b/src/librustc/ty/cast.rs index 7ea5c73c5b7..bc12412312d 100644 --- a/src/librustc/ty/cast.rs +++ b/src/librustc/ty/cast.rs @@ -52,7 +52,7 @@ impl<'tcx> CastTy<'tcx> { /// Returns `Some` for integral/pointer casts. /// casts like unsizing casts will return `None` pub fn from_ty(t: Ty<'tcx>) -> Option> { - 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)),