about summary refs log tree commit diff
path: root/src/librustc_codegen_utils
diff options
context:
space:
mode:
authorNicholas Nethercote <nnethercote@mozilla.com>2019-05-15 06:32:44 +1000
committerNicholas Nethercote <nnethercote@mozilla.com>2019-05-21 20:08:33 +1000
commitb557567c35cbb0c84c536e62df8dbfd1694314ef (patch)
treef92ef3e577e65a78da9b998b1d5a63ad79872df6 /src/librustc_codegen_utils
parentd35181ad8785fa958e43580a29a982afe02c728f (diff)
downloadrust-b557567c35cbb0c84c536e62df8dbfd1694314ef.tar.gz
rust-b557567c35cbb0c84c536e62df8dbfd1694314ef.zip
Remove impls for `InternedString`/string equality.
`Symbol` received the same treatment in #60630.

Also, we can derive `PartialEq` for `InternedString`.
Diffstat (limited to 'src/librustc_codegen_utils')
-rw-r--r--src/librustc_codegen_utils/symbol_names.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librustc_codegen_utils/symbol_names.rs b/src/librustc_codegen_utils/symbol_names.rs
index 6915687ceba..1a8647ed197 100644
--- a/src/librustc_codegen_utils/symbol_names.rs
+++ b/src/librustc_codegen_utils/symbol_names.rs
@@ -264,7 +264,7 @@ fn compute_symbol_name(tcx: TyCtxt<'_, 'tcx, 'tcx>, instance: Instance<'tcx>) ->
             return name.as_interned_str();
         }
         // Don't mangle foreign items.
-        return tcx.item_name(def_id);
+        return tcx.item_name(def_id).as_interned_str();
     }
 
     if let Some(name) = &attrs.export_name {
@@ -274,7 +274,7 @@ fn compute_symbol_name(tcx: TyCtxt<'_, 'tcx, 'tcx>, instance: Instance<'tcx>) ->
 
     if attrs.flags.contains(CodegenFnAttrFlags::NO_MANGLE) {
         // Don't mangle
-        return tcx.item_name(def_id);
+        return tcx.item_name(def_id).as_interned_str();
     }
 
     // We want to compute the "type" of this item. Unfortunately, some