@@ -116,7 +116,7 @@ pub fn def_id_to_string<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, def_id: DefId) ->
116
116
def_path_to_string ( tcx, & def_path)
117
117
}
118
118
119
- pub fn def_path_to_string < ' a , ' tcx > ( tcx : TyCtxt < ' a , ' tcx , ' tcx > , def_path : & DefPath ) -> String {
119
+ fn def_path_to_string < ' a , ' tcx > ( tcx : TyCtxt < ' a , ' tcx , ' tcx > , def_path : & DefPath ) -> String {
120
120
let mut s = String :: with_capacity ( def_path. data . len ( ) * 16 ) ;
121
121
122
122
s. push_str ( & tcx. crate_name ( def_path. krate ) ) ;
@@ -187,14 +187,13 @@ fn get_symbol_hash<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>,
187
187
}
188
188
}
189
189
190
- fn exported_name_with_opt_suffix < ' a , ' tcx > ( ccx : & CrateContext < ' a , ' tcx > ,
191
- instance : & Instance < ' tcx > ,
192
- suffix : Option < & str > )
193
- -> String {
190
+ pub fn exported_name < ' a , ' tcx > ( ccx : & CrateContext < ' a , ' tcx > ,
191
+ instance : & Instance < ' tcx > )
192
+ -> String {
194
193
let & Instance { def : mut def_id, ref substs } = instance;
195
194
196
- debug ! ( "exported_name_with_opt_suffix (def_id={:?}, substs={:?}, suffix ={:?})" ,
197
- def_id, substs, suffix ) ;
195
+ debug ! ( "exported_name (def_id={:?}, substs={:?})" ,
196
+ def_id, substs) ;
198
197
199
198
if let Some ( node_id) = ccx. tcx ( ) . map . as_local_node_id ( def_id) {
200
199
if let Some ( & src_def_id) = ccx. external_srcs ( ) . borrow ( ) . get ( & node_id) {
@@ -242,10 +241,6 @@ fn exported_name_with_opt_suffix<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>,
242
241
} ;
243
242
ccx. tcx ( ) . push_item_path ( & mut buffer, def_id) ;
244
243
245
- if let Some ( suffix) = suffix {
246
- buffer. push ( suffix) ;
247
- }
248
-
249
244
mangle ( buffer. names . into_iter ( ) , Some ( & hash[ ..] ) )
250
245
}
251
246
@@ -264,19 +259,6 @@ impl ItemPathBuffer for SymbolPathBuffer {
264
259
}
265
260
}
266
261
267
- pub fn exported_name < ' a , ' tcx > ( ccx : & CrateContext < ' a , ' tcx > ,
268
- instance : & Instance < ' tcx > )
269
- -> String {
270
- exported_name_with_opt_suffix ( ccx, instance, None )
271
- }
272
-
273
- pub fn exported_name_with_suffix < ' a , ' tcx > ( ccx : & CrateContext < ' a , ' tcx > ,
274
- instance : & Instance < ' tcx > ,
275
- suffix : & str )
276
- -> String {
277
- exported_name_with_opt_suffix ( ccx, instance, Some ( suffix) )
278
- }
279
-
280
262
/// Only symbols that are invisible outside their compilation unit should use a
281
263
/// name generated by this function.
282
264
pub fn internal_name_from_type_and_suffix < ' a , ' tcx > ( ccx : & CrateContext < ' a , ' tcx > ,
0 commit comments