about summary refs log tree commit diff
path: root/src/librustc_codegen_utils
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-11-06 07:03:01 +0100
committerGitHub <noreply@github.com>2019-11-06 07:03:01 +0100
commita0b4b4dafaef944df28f2d9d5e94d6ce190a0504 (patch)
treebe238e0b515a44f52a5ee8873ffdab38a0560336 /src/librustc_codegen_utils
parente4931eaaa3d95189b30e90d3af9f0db17c41bbb0 (diff)
parentd0db29003975d8c4b3a552ff8c3a68435173cdc7 (diff)
downloadrust-a0b4b4dafaef944df28f2d9d5e94d6ce190a0504.tar.gz
rust-a0b4b4dafaef944df28f2d9d5e94d6ce190a0504.zip
Rollup merge of #65776 - nnethercote:rename-LocalInternedString-and-more, r=estebank
Rename `LocalInternedString` and more

This PR renames `LocalInternedString` as `SymbolStr`, removes an unnecessary `impl` from it, improves comments, and cleans up some `SymbolStr` uses.

r? @estebank
Diffstat (limited to 'src/librustc_codegen_utils')
-rw-r--r--src/librustc_codegen_utils/symbol_names/legacy.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/librustc_codegen_utils/symbol_names/legacy.rs b/src/librustc_codegen_utils/symbol_names/legacy.rs
index 601a33a66bb..66e1b6d949e 100644
--- a/src/librustc_codegen_utils/symbol_names/legacy.rs
+++ b/src/librustc_codegen_utils/symbol_names/legacy.rs
@@ -121,9 +121,10 @@ fn get_symbol_hash<'tcx>(
         substs.hash_stable(&mut hcx, &mut hasher);
 
         if let Some(instantiating_crate) = instantiating_crate {
-            (&tcx.original_crate_name(instantiating_crate).as_str()[..])
+            tcx.original_crate_name(instantiating_crate).as_str()
+                .hash_stable(&mut hcx, &mut hasher);
+            tcx.crate_disambiguator(instantiating_crate)
                 .hash_stable(&mut hcx, &mut hasher);
-            (&tcx.crate_disambiguator(instantiating_crate)).hash_stable(&mut hcx, &mut hasher);
         }
 
         // We want to avoid accidental collision between different types of instances.