@@ -652,7 +652,7 @@ impl_known_layout!(const N: usize, T => [T; N]);
652
652
653
653
safety_comment ! {
654
654
/// SAFETY:
655
- // TODO(#61 ): Add reference to docs + quotes
655
+ // TODO(#429 ): Add reference to docs + quotes
656
656
/// `str` and `ManuallyDrop<[T]>` have the same representations as `[u8]`
657
657
/// and `[T]` repsectively. `str` has different bit validity than `[u8]`,
658
658
/// but that doesn't affect the soundness of this impl.
@@ -757,7 +757,7 @@ pub unsafe trait FromZeroes {
757
757
let slf: * mut Self = self ;
758
758
let len = mem:: size_of_val ( self ) ;
759
759
// SAFETY:
760
- // TODO(#61 ): Add reference to docs + quotes
760
+ // TODO(#429 ): Add reference to docs + quotes
761
761
// - `self` is guaranteed by the type system to be valid for writes of
762
762
// size `size_of_val(self)`.
763
763
// - `u8`'s alignment is 1, and thus `self` is guaranteed to be aligned
@@ -1145,7 +1145,7 @@ pub unsafe trait AsBytes {
1145
1145
let slf: * const Self = self ;
1146
1146
1147
1147
// SAFETY:
1148
- // TODO(#61 ): Add reference to docs + quotes
1148
+ // TODO(#429 ): Add reference to docs + quotes
1149
1149
// - `slf.cast::<u8>()` is valid for reads for `len *
1150
1150
// mem::size_of::<u8>()` many bytes because...
1151
1151
// - `slf` is the same pointer as `self`, and `self` is a reference
@@ -1286,7 +1286,7 @@ safety_comment! {
1286
1286
1287
1287
safety_comment ! {
1288
1288
/// SAFETY:
1289
- /// TODO(#61 ): Add quotes
1289
+ /// TODO(#429 ): Add quotes
1290
1290
/// - `FromZeroes`, `FromBytes`: all bit patterns are valid for integers [1]
1291
1291
/// - `AsBytes`: integers have no padding bytes [1]
1292
1292
/// - `Unaligned` (`u8` and `i8` only): The reference [2] specifies the size
@@ -1322,8 +1322,8 @@ safety_comment! {
1322
1322
/// - `AsBytes`: the `{f32,f64}::to_bits` methods' documentation [4,5]
1323
1323
/// states that they are currently equivalent to `transmute`. [3]
1324
1324
///
1325
- /// TODO(#61 ): Make these arguments more precisely in terms of the documentation
1326
- /// TODO(#61 ): Add quotes
1325
+ /// TODO(#429 ): Make these arguments more precisely in terms of the documentation
1326
+ /// TODO(#429 ): Add quotes
1327
1327
///
1328
1328
/// [1] https://doc.rust-lang.org/nightly/std/primitive.f32.html#method.from_bits
1329
1329
/// [2] https://doc.rust-lang.org/nightly/std/primitive.f64.html#method.from_bits
@@ -1365,7 +1365,7 @@ safety_comment! {
1365
1365
}
1366
1366
safety_comment ! {
1367
1367
/// SAFETY:
1368
- /// TODO(#61 ): Add quotes
1368
+ /// TODO(#429 ): Add quotes
1369
1369
/// - `FromZeroes`, `AsBytes`, `Unaligned`: Per the reference [1], `str` has
1370
1370
/// the same layout as `[u8]`, and `[u8]` is `FromZeroes`, `AsBytes`, and
1371
1371
/// `Unaligned`.
@@ -1381,7 +1381,7 @@ safety_comment! {
1381
1381
// `NonZeroXxx` is `AsBytes`, but not `FromZeroes` or `FromBytes`.
1382
1382
//
1383
1383
/// SAFETY:
1384
- /// TODO(#61 ): Add quotes
1384
+ /// TODO(#429 ): Add quotes
1385
1385
/// - `AsBytes`: `NonZeroXxx` has the same layout as its associated
1386
1386
/// primitive. Since it is the same size, this guarantees it has no
1387
1387
/// padding - integers have no padding, and there's no room for padding
@@ -1416,7 +1416,7 @@ safety_comment! {
1416
1416
}
1417
1417
safety_comment ! {
1418
1418
/// SAFETY:
1419
- /// TODO(#61 ): Add quotes
1419
+ /// TODO(#429 ): Add quotes
1420
1420
/// - `FromZeroes`, `FromBytes`, `AsBytes`: The Rust compiler reuses `0`
1421
1421
/// value to represent `None`, so `size_of::<Option<NonZeroXxx>>() ==
1422
1422
/// size_of::<xxx>()`; see `NonZeroXxx` documentation.
@@ -1470,7 +1470,7 @@ safety_comment! {
1470
1470
}
1471
1471
safety_comment ! {
1472
1472
/// SAFETY:
1473
- /// TODO(#61 ): Add quotes
1473
+ /// TODO(#429 ): Add quotes
1474
1474
/// `Wrapping<T>` is guaranteed by its docs [1] to have the same layout as
1475
1475
/// `T`. Also, `Wrapping<T>` is `#[repr(transparent)]`, and has a single
1476
1476
/// field, which is `pub`. Per the reference [2], this means that the
@@ -1512,7 +1512,7 @@ safety_comment! {
1512
1512
}
1513
1513
safety_comment ! {
1514
1514
/// SAFETY:
1515
- // TODO(#61 ): Add reference to docs + quotes
1515
+ // TODO(#429 ): Add reference to docs + quotes
1516
1516
/// `ManuallyDrop` has the same layout as `T`, and accessing the inner value
1517
1517
/// is safe (meaning that it's unsound to leave the inner value
1518
1518
/// uninitialized while exposing the `ManuallyDrop` to safe code).
0 commit comments