about summary refs log tree commit diff
path: root/src/librustc/mir
diff options
context:
space:
mode:
authorvarkor <github@varkor.com>2018-08-22 01:35:55 +0100
committervarkor <github@varkor.com>2018-08-22 16:08:49 +0100
commit8a5dccde2adca594db2ecd684484410139842c29 (patch)
treee20a0973374adff0a06f2f54d171dc21ff0dcb3b /src/librustc/mir
parent04fa5d3adbb8212f5b4e87e3bbd7b74bb7c9ec65 (diff)
downloadrust-8a5dccde2adca594db2ecd684484410139842c29.tar.gz
rust-8a5dccde2adca594db2ecd684484410139842c29.zip
Remove Ty prefix from Ty{Bool|Char|Int|Uint|Float|Str}
Diffstat (limited to 'src/librustc/mir')
-rw-r--r--src/librustc/mir/mod.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/librustc/mir/mod.rs b/src/librustc/mir/mod.rs
index 9d556902e43..66a42cfb11a 100644
--- a/src/librustc/mir/mod.rs
+++ b/src/librustc/mir/mod.rs
@@ -2227,12 +2227,12 @@ pub fn fmt_const_val(f: &mut impl Write, const_val: &ty::Const) -> fmt::Result {
     // print some primitives
     if let ConstValue::Scalar(Scalar::Bits { bits, .. }) = value {
         match ty.sty {
-            TyBool if bits == 0 => return write!(f, "false"),
-            TyBool if bits == 1 => return write!(f, "true"),
-            TyFloat(ast::FloatTy::F32) => return write!(f, "{}f32", Single::from_bits(bits)),
-            TyFloat(ast::FloatTy::F64) => return write!(f, "{}f64", Double::from_bits(bits)),
-            TyUint(ui) => return write!(f, "{:?}{}", bits, ui),
-            TyInt(i) => {
+            Bool if bits == 0 => return write!(f, "false"),
+            Bool if bits == 1 => return write!(f, "true"),
+            Float(ast::FloatTy::F32) => return write!(f, "{}f32", Single::from_bits(bits)),
+            Float(ast::FloatTy::F64) => return write!(f, "{}f64", Double::from_bits(bits)),
+            Uint(ui) => return write!(f, "{:?}{}", bits, ui),
+            Int(i) => {
                 let bit_width = ty::tls::with(|tcx| {
                     let ty = tcx.lift_to_global(&ty).unwrap();
                     tcx.layout_of(ty::ParamEnv::empty().and(ty))
@@ -2243,7 +2243,7 @@ pub fn fmt_const_val(f: &mut impl Write, const_val: &ty::Const) -> fmt::Result {
                 let shift = 128 - bit_width;
                 return write!(f, "{:?}{}", ((bits as i128) << shift) >> shift, i);
             }
-            TyChar => return write!(f, "{:?}", ::std::char::from_u32(bits as u32).unwrap()),
+            Char => return write!(f, "{:?}", ::std::char::from_u32(bits as u32).unwrap()),
             _ => {},
         }
     }
@@ -2255,7 +2255,7 @@ pub fn fmt_const_val(f: &mut impl Write, const_val: &ty::Const) -> fmt::Result {
     if let ConstValue::ScalarPair(ptr, len) = value {
         if let Scalar::Ptr(ptr) = ptr {
             if let ScalarMaybeUndef::Scalar(Scalar::Bits { bits: len, .. }) = len {
-                if let Ref(_, &ty::TyS { sty: TyStr, .. }, _) = ty.sty {
+                if let Ref(_, &ty::TyS { sty: Str, .. }, _) = ty.sty {
                     return ty::tls::with(|tcx| {
                         let alloc = tcx.alloc_map.lock().get(ptr.alloc_id);
                         if let Some(interpret::AllocType::Memory(alloc)) = alloc {