Restrict access to crate_name.

Also remove original_crate_name, which had the exact same implementation
This commit is contained in:
Camille GILLOT
2021-05-10 18:23:32 +02:00
parent 2f601ef527
commit 0e71283495
19 changed files with 23 additions and 30 deletions

View File

@@ -49,7 +49,7 @@ impl<'tcx> ExportedSymbol<'tcx> {
pub fn metadata_symbol_name(tcx: TyCtxt<'_>) -> String {
format!(
"rust_metadata_{}_{:08x}",
tcx.original_crate_name(LOCAL_CRATE),
tcx.crate_name(LOCAL_CRATE),
tcx.sess.local_stable_crate_id().to_u64(),
)
}