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 29c6c22 commit bae7e39Copy full SHA for bae7e39
src/lib.rs
@@ -681,10 +681,8 @@ pub unsafe trait AsBytes {
681
// - Since `slf` is derived from `self`, and `self` is an immutable
682
// reference, the only other references to this memory region that
683
// could exist are other immutable references, and those don't allow
684
- // mutation.
685
- //
686
- // TODO(#8): Update `AsRef` docs to require that `Self` doesn't allow
687
- // 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.
688
// - The total size of the resulting slice is no larger than
689
// `isize::MAX` because no allocation produced by safe code can be
690
// larger than `isize::MAX`.
0 commit comments