@@ -61,21 +61,27 @@ pub fn push_debuginfo_type_name<'a, 'tcx>(cx: &CrateContext<'a, 'tcx>,
61
61
output. push ( ')' ) ;
62
62
} ,
63
63
ty:: TyRawPtr ( ty:: TypeAndMut { ty : inner_type, mutbl } ) => {
64
- output. push ( '*' ) ;
64
+ let is_like_msvc = cx. sess ( ) . target . target . options . is_like_msvc ;
65
+
66
+ if !is_like_msvc { output. push ( '*' ) ; }
65
67
match mutbl {
66
68
hir:: MutImmutable => output. push_str ( "const " ) ,
67
69
hir:: MutMutable => output. push_str ( "mut " ) ,
68
70
}
69
71
70
72
push_debuginfo_type_name ( cx, inner_type, true , output) ;
73
+ if is_like_msvc { output. push ( '*' ) ; }
71
74
} ,
72
75
ty:: TyRef ( _, ty:: TypeAndMut { ty : inner_type, mutbl } ) => {
73
- output. push ( '&' ) ;
76
+ let is_like_msvc = cx. sess ( ) . target . target . options . is_like_msvc ;
77
+
78
+ if !is_like_msvc { output. push ( '&' ) ; }
74
79
if mutbl == hir:: MutMutable {
75
80
output. push_str ( "mut " ) ;
76
81
}
77
82
78
83
push_debuginfo_type_name ( cx, inner_type, true , output) ;
84
+ if is_like_msvc { output. push ( '*' ) ; }
79
85
} ,
80
86
ty:: TyArray ( inner_type, len) => {
81
87
output. push ( '[' ) ;
@@ -84,9 +90,10 @@ pub fn push_debuginfo_type_name<'a, 'tcx>(cx: &CrateContext<'a, 'tcx>,
84
90
output. push ( ']' ) ;
85
91
} ,
86
92
ty:: TySlice ( inner_type) => {
87
- output. push ( '[' ) ;
93
+ let is_like_msvc = cx. sess ( ) . target . target . options . is_like_msvc ;
94
+ output. push_str ( if is_like_msvc { "slice<" } else { "[" } ) ;
88
95
push_debuginfo_type_name ( cx, inner_type, true , output) ;
89
- output. push ( ']' ) ;
96
+ output. push ( if is_like_msvc { '>' } else { ']' } ) ;
90
97
} ,
91
98
ty:: TyDynamic ( ref trait_data, ..) => {
92
99
if let Some ( principal) = trait_data. principal ( ) {
0 commit comments