From bae7e39f38065c913c04c7613aa40e8c7c5f8163 Mon Sep 17 00:00:00 2001 From: Joshua Liebow-Feeser Date: Sun, 3 Sep 2023 15:17:02 -0700 Subject: [PATCH] Remove TODO (#314) This TODO was anchored on #8, which was fixed in #283. --- src/lib.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 42c1569bdf..1e9a374f17 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -681,10 +681,8 @@ pub unsafe trait AsBytes { // - Since `slf` is derived from `self`, and `self` is an immutable // reference, the only other references to this memory region that // could exist are other immutable references, and those don't allow - // mutation. - // - // TODO(#8): Update `AsRef` docs to require that `Self` doesn't allow - // 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. // - The total size of the resulting slice is no larger than // `isize::MAX` because no allocation produced by safe code can be // larger than `isize::MAX`.