Skip to content

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Nov 5, 2025

Improve the docs for Address::from_ptr to highlight why it's best avoided.

This was prompted by me noticing that Rolldown uses Address::from_ptr (rolldown/rolldown#6245).

@github-actions github-actions bot added the C-docs Category - Documentation. Related to user-facing or internal documentation label Nov 5, 2025
Copy link
Member Author


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

Copy link
Contributor

Copilot AI left a comment

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 enhances the documentation for the Address::from_ptr method by clarifying its usage and potential pitfalls. The update emphasizes that this method should be used as an escape hatch, with preference given to GetAddress::address for more stable address retrieval.

Key Changes:

  • Reorganized and expanded documentation to highlight best practices
  • Added comprehensive example demonstrating the difference between Address::from_ptr and GetAddress::address
  • Clarified behavior when AST nodes are stored in Vec vs Box

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codspeed-hq
Copy link

codspeed-hq bot commented Nov 5, 2025

CodSpeed Performance Report

Merging #15311 will not alter performance

Comparing 09-17-docs_allocator_address_improve_docs_for_address_from_ptr_ (f2b6b90) with main (798216b)1

Summary

✅ 37 untouched

Footnotes

  1. No successful run was found on main (77a84a8) during the generation of this report, so 798216b was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@overlookmotel overlookmotel self-assigned this Nov 5, 2025
@graphite-app graphite-app bot added the 0-merge Merge with Graphite Merge Queue label Nov 5, 2025
@graphite-app
Copy link
Contributor

graphite-app bot commented Nov 5, 2025

Merge activity

Improve the docs for `Address::from_ptr` to highlight why it's best avoided.

This was prompted by me noticing that Rolldown uses `Address::from_ptr` (rolldown/rolldown#6245).
@graphite-app graphite-app bot force-pushed the 09-17-docs_allocator_address_improve_docs_for_address_from_ptr_ branch from f2b6b90 to ed0e023 Compare November 5, 2025 11:31
@graphite-app graphite-app bot merged commit ed0e023 into main Nov 5, 2025
21 checks passed
@graphite-app graphite-app bot deleted the 09-17-docs_allocator_address_improve_docs_for_address_from_ptr_ branch November 5, 2025 11:38
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Nov 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-docs Category - Documentation. Related to user-facing or internal documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants