about summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa/src
diff options
context:
space:
mode:
authormarmeladema <xademax@gmail.com>2020-09-01 13:11:28 +0100
committermarmeladema <xademax@gmail.com>2020-09-25 22:46:15 +0100
commitbb8e1764bb31bc63a6b61f446e28bb567015de01 (patch)
treec9ad2139a7766766b231bac74e8751f8e8609d23 /compiler/rustc_codegen_ssa/src
parent75130b06bff9cf4af528cf19513f802a837bdd23 (diff)
downloadrust-bb8e1764bb31bc63a6b61f446e28bb567015de01.tar.gz
rust-bb8e1764bb31bc63a6b61f446e28bb567015de01.zip
Simplify some match statements on `DefPathDataName'
Diffstat (limited to 'compiler/rustc_codegen_ssa/src')
-rw-r--r--compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs9
1 files changed, 1 insertions, 8 deletions
diff --git a/compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs b/compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs
index 5642cc526ae..45ecb793387 100644
--- a/compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs
+++ b/compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs
@@ -3,7 +3,6 @@
 use rustc_data_structures::fx::FxHashSet;
 use rustc_hir as hir;
 use rustc_hir::def_id::DefId;
-use rustc_hir::definitions::DefPathDataName;
 use rustc_middle::ty::{self, subst::SubstsRef, Ty, TyCtxt};
 
 use std::fmt::Write;
@@ -231,13 +230,7 @@ pub fn push_debuginfo_type_name<'tcx>(
         if qualified {
             output.push_str(&tcx.crate_name(def_id.krate).as_str());
             for path_element in tcx.def_path(def_id).data {
-                output.push_str("::");
-                match path_element.data.name() {
-                    DefPathDataName::Named(name) => output.push_str(&name.as_str()),
-                    DefPathDataName::Anon { namespace } => {
-                        write!(output, "{{{{{}}}}}", namespace).unwrap()
-                    }
-                }
+                write!(output, "::{}", path_element.data).unwrap();
             }
         } else {
             output.push_str(&tcx.item_name(def_id).as_str());