Skip to content

Commit 409276c

Browse files
committed
Store a Symbol instead of an Ident in VariantDef/FieldDef
The field is also renamed from `ident` to `name. In most cases, we don't actually need the `Span`. A new `ident` method is added to `VariantDef` and `FieldDef`, which constructs the full `Ident` using `tcx.def_ident_span()`. This method is used in the cases where we actually need an `Ident`. This makes incremental compilation properly track changes to the `Span`, without all of the invalidations caused by storing a `Span` directly via an `Ident`.
1 parent 1da0071 commit 409276c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/debuginfo/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ impl<'tcx> DebugContext<'tcx> {
174174

175175
field_entry.set(
176176
gimli::DW_AT_name,
177-
AttributeValue::String(field_def.ident.as_str().to_string().into_bytes()),
177+
AttributeValue::String(field_def.name.as_str().to_string().into_bytes()),
178178
);
179179
field_entry.set(
180180
gimli::DW_AT_data_member_location,

0 commit comments

Comments
 (0)