We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 62f76d2 commit a87bc52Copy full SHA for a87bc52
src/lib.rs
@@ -680,10 +680,8 @@ pub unsafe trait AsBytes {
680
// - Since `slf` is derived from `self`, and `self` is an immutable
681
// reference, the only other references to this memory region that
682
// could exist are other immutable references, and those don't allow
683
- // mutation.
684
- //
685
- // TODO(#8): Update `AsRef` docs to require that `Self` doesn't allow
686
- // interior mutability so that this bullet point is actually true.
+ // mutation. `AsBytes` prohibits types which contain `UnsafeCell`s,
+ // which are the only types for which this rule wouldn't be sufficient.
687
// - The total size of the resulting slice is no larger than
688
// `isize::MAX` because no allocation produced by safe code can be
689
// larger than `isize::MAX`.
0 commit comments