]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc/ty/cast.rs
Rollup merge of #64765 - alexcrichton:less-check-backtrace, r=sfackler
[rust.git] / src / librustc / ty / cast.rs
index 7ea5c73c5b749b9803cf53617e6b2e27946286ec..bc12412312debcb100a70d0d5f0cbd9bcfb4bdf2 100644 (file)
@@ -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<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)),