Skip to content

Clarify FixedAddressValueTypeAttribute applicability and static field storage wording#12770

Open
Copilot wants to merge 3 commits into
mainfrom
copilot/fixedaddressvaluetype-docs-feedback
Open

Clarify FixedAddressValueTypeAttribute applicability and static field storage wording#12770
Copilot wants to merge 3 commits into
mainfrom
copilot/fixedaddressvaluetype-docs-feedback

Conversation

Copilot AI commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

This PR updates FixedAddressValueTypeAttribute documentation to align with runtime feedback on attribute applicability. It also replaces an implementation-detail statement with wording that better reflects actual static field storage behavior.

  • Applicability clarification

    • Explicitly documents that the attribute does not apply to primitive value type and enum fields.
  • Remarks wording update

    • Replaces “Static value type fields are created as boxed objects.” with “The storage for static fields may be allocated on GC heap.”
  • Updated doc text (excerpt)

    Use the <xref:System.Runtime.CompilerServices.FixedAddressValueTypeAttribute> attribute to mark static value types as pinned upon creation. This attribute does not apply to primitive value type and enum fields.
    
    The storage for static fields may be allocated on GC heap. This means that their address can change as garbage collection is performed.

Copilot AI changed the title Update FixedAddressValueTypeAttribute docs based on runtime feedback Clarify FixedAddressValueTypeAttribute applicability and static field storage wording Jun 21, 2026
Copilot AI requested a review from jkotas June 21, 2026 13:44
Comment thread xml/System.Runtime.CompilerServices/FixedAddressValueTypeAttribute.xml Outdated
@jkotas jkotas marked this pull request as ready for review June 21, 2026 13:48
@jkotas jkotas requested a review from a team as a code owner June 21, 2026 13:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the ECMA XML documentation for System.Runtime.CompilerServices.FixedAddressValueTypeAttribute to better reflect the attribute’s actual applicability and to avoid overstating an implementation detail about static field storage.

Changes:

  • Clarifies that FixedAddressValueTypeAttribute applies to static value type fields, and that it doesn’t apply to primitive value type fields or enum fields.
  • Rewords the remarks about static field storage to reflect that storage can be on the GC heap, which allows addresses to change during garbage collection.

Comment thread xml/System.Runtime.CompilerServices/FixedAddressValueTypeAttribute.xml Outdated
Copilot AI requested a review from jkotas June 21, 2026 13:53
@github-actions github-actions Bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Jun 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants