diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2025-04-14 13:15:01 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2025-04-15 08:07:15 +1000 |
| commit | 78599d83e7ab9f8cd4cbb9e982ddf12f258d6b18 (patch) | |
| tree | c1c0488e6609360dba87b88a8e390b3ebfce939a /compiler/rustc_symbol_mangling/src | |
| parent | 89e93a51c81b521a9601b365e3325d31e44e9198 (diff) | |
| download | rust-78599d83e7ab9f8cd4cbb9e982ddf12f258d6b18.tar.gz rust-78599d83e7ab9f8cd4cbb9e982ddf12f258d6b18.zip | |
Move `name` field from `AssocItem` to `AssocKind` variants.
To accurately reflect that RPITIT assoc items don't have a name. This avoids the use of `kw::Empty` to mean "no name", which is error prone. Helps with #137978.
Diffstat (limited to 'compiler/rustc_symbol_mangling/src')
| -rw-r--r-- | compiler/rustc_symbol_mangling/src/v0.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_symbol_mangling/src/v0.rs b/compiler/rustc_symbol_mangling/src/v0.rs index d28f10ba9e3..a4e1266e764 100644 --- a/compiler/rustc_symbol_mangling/src/v0.rs +++ b/compiler/rustc_symbol_mangling/src/v0.rs @@ -615,7 +615,7 @@ impl<'tcx> Printer<'tcx> for SymbolMangler<'tcx> { cx.print_def_path(trait_ref.def_id, trait_ref.args)?; } ty::ExistentialPredicate::Projection(projection) => { - let name = cx.tcx.associated_item(projection.def_id).name; + let name = cx.tcx.associated_item(projection.def_id).name(); cx.push("p"); cx.push_ident(name.as_str()); match projection.term.unpack() { |
