@@ -46,7 +46,7 @@ use std::rc::Rc;
46
46
use syntax;
47
47
use syntax:: util:: interner:: Interner ;
48
48
use syntax:: codemap:: Span ;
49
- use syntax:: { ast, codemap} ;
49
+ use syntax:: { ast, ast_util , codemap} ;
50
50
use syntax:: parse:: token;
51
51
52
52
@@ -932,26 +932,17 @@ fn basic_type_metadata<'a, 'tcx>(cx: &CrateContext<'a, 'tcx>,
932
932
933
933
let ( name, encoding) = match t. sty {
934
934
ty:: TyTuple ( ref elements) if elements. is_empty ( ) =>
935
- ( "()" . to_string ( ) , DW_ATE_unsigned ) ,
936
- ty:: TyBool => ( "bool" . to_string ( ) , DW_ATE_boolean ) ,
937
- ty:: TyChar => ( "char" . to_string ( ) , DW_ATE_unsigned_char ) ,
938
- ty:: TyInt ( int_ty) => match int_ty {
939
- ast:: TyIs => ( "isize" . to_string ( ) , DW_ATE_signed ) ,
940
- ast:: TyI8 => ( "i8" . to_string ( ) , DW_ATE_signed ) ,
941
- ast:: TyI16 => ( "i16" . to_string ( ) , DW_ATE_signed ) ,
942
- ast:: TyI32 => ( "i32" . to_string ( ) , DW_ATE_signed ) ,
943
- ast:: TyI64 => ( "i64" . to_string ( ) , DW_ATE_signed )
935
+ ( "()" , DW_ATE_unsigned ) ,
936
+ ty:: TyBool => ( "bool" , DW_ATE_boolean ) ,
937
+ ty:: TyChar => ( "char" , DW_ATE_unsigned_char ) ,
938
+ ty:: TyInt ( int_ty) => {
939
+ ( ast_util:: int_ty_to_string ( int_ty) , DW_ATE_signed )
944
940
} ,
945
- ty:: TyUint ( uint_ty) => match uint_ty {
946
- ast:: TyUs => ( "usize" . to_string ( ) , DW_ATE_unsigned ) ,
947
- ast:: TyU8 => ( "u8" . to_string ( ) , DW_ATE_unsigned ) ,
948
- ast:: TyU16 => ( "u16" . to_string ( ) , DW_ATE_unsigned ) ,
949
- ast:: TyU32 => ( "u32" . to_string ( ) , DW_ATE_unsigned ) ,
950
- ast:: TyU64 => ( "u64" . to_string ( ) , DW_ATE_unsigned )
941
+ ty:: TyUint ( uint_ty) => {
942
+ ( ast_util:: uint_ty_to_string ( uint_ty) , DW_ATE_unsigned )
951
943
} ,
952
- ty:: TyFloat ( float_ty) => match float_ty {
953
- ast:: TyF32 => ( "f32" . to_string ( ) , DW_ATE_float ) ,
954
- ast:: TyF64 => ( "f64" . to_string ( ) , DW_ATE_float ) ,
944
+ ty:: TyFloat ( float_ty) => {
945
+ ( ast_util:: float_ty_to_string ( float_ty) , DW_ATE_float )
955
946
} ,
956
947
_ => cx. sess ( ) . bug ( "debuginfo::basic_type_metadata - t is invalid type" )
957
948
} ;
0 commit comments