diff options
| author | Michael Goulet <michael@errs.io> | 2025-03-30 21:39:12 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2025-03-30 22:53:21 +0000 |
| commit | 897acc3e5d3622927118924fa920c8be0ef6f154 (patch) | |
| tree | 259f699bfddad26f179bdd7b165d7deacac20584 /compiler/rustc_symbol_mangling/src | |
| parent | 46424fb5054f211ec836c5c03159f92e46bb35ac (diff) | |
| download | rust-897acc3e5d3622927118924fa920c8be0ef6f154.tar.gz rust-897acc3e5d3622927118924fa920c8be0ef6f154.zip | |
Encode synthetic by-move coroutine body with a different DefPathData
Diffstat (limited to 'compiler/rustc_symbol_mangling/src')
| -rw-r--r-- | compiler/rustc_symbol_mangling/src/legacy.rs | 5 | ||||
| -rw-r--r-- | compiler/rustc_symbol_mangling/src/v0.rs | 1 |
2 files changed, 5 insertions, 1 deletions
diff --git a/compiler/rustc_symbol_mangling/src/legacy.rs b/compiler/rustc_symbol_mangling/src/legacy.rs index 88754f1f15b..2802e891807 100644 --- a/compiler/rustc_symbol_mangling/src/legacy.rs +++ b/compiler/rustc_symbol_mangling/src/legacy.rs @@ -28,7 +28,10 @@ pub(super) fn mangle<'tcx>( loop { let key = tcx.def_key(ty_def_id); match key.disambiguated_data.data { - DefPathData::TypeNs(_) | DefPathData::ValueNs(_) | DefPathData::Closure => { + DefPathData::TypeNs(_) + | DefPathData::ValueNs(_) + | DefPathData::Closure + | DefPathData::SyntheticCoroutineBody => { instance_ty = tcx.type_of(ty_def_id).instantiate_identity(); debug!(?instance_ty); break; diff --git a/compiler/rustc_symbol_mangling/src/v0.rs b/compiler/rustc_symbol_mangling/src/v0.rs index d824a23279b..99d44bcd7eb 100644 --- a/compiler/rustc_symbol_mangling/src/v0.rs +++ b/compiler/rustc_symbol_mangling/src/v0.rs @@ -850,6 +850,7 @@ impl<'tcx> Printer<'tcx> for SymbolMangler<'tcx> { DefPathData::Ctor => 'c', DefPathData::AnonConst => 'k', DefPathData::OpaqueTy => 'i', + DefPathData::SyntheticCoroutineBody => 's', // These should never show up as `path_append` arguments. DefPathData::CrateRoot |
