Skip to content

refactor(lexer): harden safety of transmute#11013

Merged
graphite-app[bot] merged 1 commit intomainfrom
05-13-refactor_lexer_harden_safety_of_transmute
May 14, 2025
Merged

refactor(lexer): harden safety of transmute#11013
graphite-app[bot] merged 1 commit intomainfrom
05-13-refactor_lexer_harden_safety_of_transmute

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented May 13, 2025

Follow-on after #10933. It's preferable to include explicit type params in calls to mem::transmute rather than relying on type inference. This ensures any later changes won't inadvertently cause UB.

Also expand the safety comment.

Copy link
Member Author

overlookmotel commented May 13, 2025


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.

@github-actions github-actions bot added A-parser Area - Parser C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior labels May 13, 2025
@overlookmotel overlookmotel marked this pull request as ready for review May 13, 2025 15:50
@graphite-app graphite-app bot changed the base branch from 05-13-style_lexer_reformat_comments to graphite-base/11013 May 13, 2025 15:53
@codspeed-hq
Copy link

codspeed-hq bot commented May 13, 2025

CodSpeed Instrumentation Performance Report

Merging #11013 will not alter performance

Comparing 05-13-refactor_lexer_harden_safety_of_transmute (c0b68eb) with main (cc0112f)

Summary

✅ 36 untouched benchmarks

@overlookmotel overlookmotel marked this pull request as draft May 13, 2025 15:58
@overlookmotel overlookmotel marked this pull request as ready for review May 13, 2025 15:58
@overlookmotel overlookmotel marked this pull request as draft May 13, 2025 15:59
@graphite-app graphite-app bot force-pushed the graphite-base/11013 branch from f235b45 to c049765 Compare May 13, 2025 15:59
@graphite-app graphite-app bot force-pushed the 05-13-refactor_lexer_harden_safety_of_transmute branch from 63d9aae to 5576c25 Compare May 13, 2025 15:59
@graphite-app graphite-app bot changed the base branch from graphite-base/11013 to main May 13, 2025 16:00
@graphite-app graphite-app bot force-pushed the 05-13-refactor_lexer_harden_safety_of_transmute branch from 5576c25 to 3f7dad1 Compare May 13, 2025 16:00
@overlookmotel overlookmotel marked this pull request as ready for review May 13, 2025 16:36
@Boshen Boshen added the 0-merge Merge with Graphite Merge Queue label May 14, 2025
Copy link
Member

Boshen commented May 14, 2025

Merge activity

Follow-on after #10933. It's preferable to include explicit type params in calls to `mem::transmute` rather than relying on type inference. This ensures any later changes won't inadvertently cause UB.

Also expand the safety comment.
@graphite-app graphite-app bot force-pushed the 05-13-refactor_lexer_harden_safety_of_transmute branch from 3f7dad1 to c0b68eb Compare May 14, 2025 01:16
@graphite-app graphite-app bot merged commit c0b68eb into main May 14, 2025
26 checks passed
@graphite-app graphite-app bot deleted the 05-13-refactor_lexer_harden_safety_of_transmute branch May 14, 2025 01:22
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label May 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-parser Area - Parser C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants