Skip to content

Commit 3918474

Browse files
committed
trans: remove unused symbol_names::exported_name_with_suffix.
1 parent 7462da5 commit 3918474

File tree

1 file changed

+6
-24
lines changed

1 file changed

+6
-24
lines changed

src/librustc_trans/back/symbol_names.rs

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ pub fn def_id_to_string<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, def_id: DefId) ->
116116
def_path_to_string(tcx, &def_path)
117117
}
118118

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 {
120120
let mut s = String::with_capacity(def_path.data.len() * 16);
121121

122122
s.push_str(&tcx.crate_name(def_path.krate));
@@ -187,14 +187,13 @@ fn get_symbol_hash<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>,
187187
}
188188
}
189189

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 {
194193
let &Instance { def: mut def_id, ref substs } = instance;
195194

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);
198197

199198
if let Some(node_id) = ccx.tcx().map.as_local_node_id(def_id) {
200199
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>,
242241
};
243242
ccx.tcx().push_item_path(&mut buffer, def_id);
244243

245-
if let Some(suffix) = suffix {
246-
buffer.push(suffix);
247-
}
248-
249244
mangle(buffer.names.into_iter(), Some(&hash[..]))
250245
}
251246

@@ -264,19 +259,6 @@ impl ItemPathBuffer for SymbolPathBuffer {
264259
}
265260
}
266261

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-
280262
/// Only symbols that are invisible outside their compilation unit should use a
281263
/// name generated by this function.
282264
pub fn internal_name_from_type_and_suffix<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>,

0 commit comments

Comments
 (0)