Add safety comments in alloc::Wtf8 - #161292
Conversation
|
r? @clarfonthey rustbot has assigned @clarfonthey. Use Why was this reviewer chosen?The reviewer was selected based on:
|
4db724d to
98f6449
Compare
| /// marked unsafe. | ||
| /// # Safety | ||
| /// | ||
| /// `value` must contain well-formed WTF-8. |
There was a problem hiding this comment.
We should probably make sure that there's some linkable documentation for this. Obviously only available in private docs, but still useful.
(Nonblocking, just mentioning.)
There was a problem hiding this comment.
Maybe I can provide a link like following:
/// `value` must contain [well-formed WTF-8](https://wtf-8.codeberg.page/#well-formed).
There was a problem hiding this comment.
Maybe I can provide a link like following:
/// `value` must contain [well-formed WTF-8](https://wtf-8.codeberg.page/#well-formed).
There was a problem hiding this comment.
Maybe I can provide a link like following:
/// `value` must contain [well-formed WTF-8](https://wtf-8.codeberg.page/#well-formed).
There was a problem hiding this comment.
I have provide the linkable documentation, hoping that it is useful.
98f6449 to
4735b8c
Compare
This PR follow up #160824 and add some safety section for unsafe APIs. This PR focus on Wtf8 in alloc and fix every
Untrigedmentioned in #160824.Before this PR, #161271 had add some safety sections for Wtf8 in core.
I'm looking forward to your review and give me any feedback to improve this PR.