Skip to content

Document the safety requirements of unsafe code in v3 - #177

Closed
riha-dev wants to merge 1 commit into
ia0:mainfrom
riha-dev:v3-unsafe-safety-docs
Closed

riha-dev wants to merge 1 commit into
ia0:mainfrom
riha-dev:v3-unsafe-safety-docs

Conversation

@riha-dev

@riha-dev riha-dev commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

lib/v3 carries no SAFETY comment on any of its unsafe blocks, unlike lib, so each one now states its invariant, undocumented_unsafe_blocks is enabled to keep it that way, the from_utf8_unchecked calls assert their ASCII precondition with safety_assert! as lib does, and copy_from_slice drops unsafe because its shared-reference cast has no precondition.

@ia0

ia0 commented Oct 7, 2026

Copy link
Copy Markdown
Owner

Thanks for the PR, but v3 is still too much in development that safety comments are worth it. I'm going to close this as I don't think it can be salvaged after the current rewrite I'm doing.

@ia0 ia0 closed this Oct 7, 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.

2 participants