Skip to content

chore: add SAFETY docs to unsafe blocks#162

Open
jiayaoqijia wants to merge 1 commit intoleanEthereum:mainfrom
jiayaoqijia:fix/unsafe-safety-docs
Open

chore: add SAFETY docs to unsafe blocks#162
jiayaoqijia wants to merge 1 commit intoleanEthereum:mainfrom
jiayaoqijia:fix/unsafe-safety-docs

Conversation

@jiayaoqijia
Copy link
Contributor

@jiayaoqijia jiayaoqijia commented Mar 1, 2026

Partial fix for #159.

Adds // SAFETY: documentation to all unsafe blocks in crates/whir/src/utils.rs, explaining why each unchecked access is sound:

  • prepare_evals_for_fft_unpacked (line 147): Documents the index arithmetic proof that src_index < evals.len().
  • prepare_evals_for_fft_packed_extension (lines 174-178): Documents bounds for packed_src_index, extension degree index i, and offset_in_packing.

@jiayaoqijia jiayaoqijia force-pushed the fix/unsafe-safety-docs branch from 96a76cb to ea6722a Compare March 1, 2026 03:47
@jiayaoqijia jiayaoqijia changed the title chore: add SAFETY docs to unsafe blocks, enable unsafe_code warning chore: add SAFETY docs to unsafe blocks Mar 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant