about summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa/src
diff options
context:
space:
mode:
authorTakayuki Maeda <takoyaki0316@gmail.com>2023-12-04 21:19:45 +0900
committerGitHub <noreply@github.com>2023-12-04 21:19:45 +0900
commit30a4215532ac4fc51fc8139a76c996b8bb4da549 (patch)
treec3ca8fa8ffac9fe52d35eed042f28cf3d390200c /compiler/rustc_codegen_ssa/src
parentda2fb8109e31fee7e858c6a7c3ce9255a035175c (diff)
parent17e799c2701be1f0f74ed79e6523e83abd051e89 (diff)
downloadrust-30a4215532ac4fc51fc8139a76c996b8bb4da549.tar.gz
rust-30a4215532ac4fc51fc8139a76c996b8bb4da549.zip
Rollup merge of #118573 - petrochenkov:pathdatakind, r=TaKO8Ki
rustc: Harmonize `DefKind` and `DefPathData`

Follow up to https://github.com/rust-lang/rust/pull/118188.

`DefPathData::(ClosureExpr,ImplTrait)` are renamed to match `DefKind::(Closure,OpaqueTy)`.

`DefPathData::ImplTraitAssocTy` is replaced with `DefPathData::TypeNS(kw::Empty)` because both correspond to `DefKind::AssocTy`.
It's possible that introducing `(DefKind,DefPathData)::AssocOpaqueTy` instead could be a better solution, but that would be a much more invasive change.

Const generic parameters introduced for effects are moved from `DefPathData::TypeNS` to `DefPathData::ValueNS`, because constants are values.

`DefPathData` is no longer passed to `create_def` functions to avoid redundancy.
Diffstat (limited to 'compiler/rustc_codegen_ssa/src')
-rw-r--r--compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs b/compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs
index 839cc4dabe3..8630e5623e1 100644
--- a/compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs
+++ b/compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs
@@ -594,7 +594,7 @@ fn push_unqualified_item_name(
         DefPathData::CrateRoot => {
             output.push_str(tcx.crate_name(def_id.krate).as_str());
         }
-        DefPathData::ClosureExpr => {
+        DefPathData::Closure => {
             let label = coroutine_kind_label(tcx.coroutine_kind(def_id));
 
             push_disambiguated_special_name(