Skip to content

Commit 48d2a97

Browse files
committed
Update references to issue #61 to issue #429
1 parent 836c63d commit 48d2a97

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/lib.rs

+11-11
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,7 @@ impl_known_layout!(const N: usize, T => [T; N]);
652652

653653
safety_comment! {
654654
/// SAFETY:
655-
// TODO(#61): Add reference to docs + quotes
655+
// TODO(#429): Add reference to docs + quotes
656656
/// `str` and `ManuallyDrop<[T]>` have the same representations as `[u8]`
657657
/// and `[T]` repsectively. `str` has different bit validity than `[u8]`,
658658
/// but that doesn't affect the soundness of this impl.
@@ -757,7 +757,7 @@ pub unsafe trait FromZeroes {
757757
let slf: *mut Self = self;
758758
let len = mem::size_of_val(self);
759759
// SAFETY:
760-
// TODO(#61): Add reference to docs + quotes
760+
// TODO(#429): Add reference to docs + quotes
761761
// - `self` is guaranteed by the type system to be valid for writes of
762762
// size `size_of_val(self)`.
763763
// - `u8`'s alignment is 1, and thus `self` is guaranteed to be aligned
@@ -1145,7 +1145,7 @@ pub unsafe trait AsBytes {
11451145
let slf: *const Self = self;
11461146

11471147
// SAFETY:
1148-
// TODO(#61): Add reference to docs + quotes
1148+
// TODO(#429): Add reference to docs + quotes
11491149
// - `slf.cast::<u8>()` is valid for reads for `len *
11501150
// mem::size_of::<u8>()` many bytes because...
11511151
// - `slf` is the same pointer as `self`, and `self` is a reference
@@ -1286,7 +1286,7 @@ safety_comment! {
12861286

12871287
safety_comment! {
12881288
/// SAFETY:
1289-
/// TODO(#61): Add quotes
1289+
/// TODO(#429): Add quotes
12901290
/// - `FromZeroes`, `FromBytes`: all bit patterns are valid for integers [1]
12911291
/// - `AsBytes`: integers have no padding bytes [1]
12921292
/// - `Unaligned` (`u8` and `i8` only): The reference [2] specifies the size
@@ -1322,8 +1322,8 @@ safety_comment! {
13221322
/// - `AsBytes`: the `{f32,f64}::to_bits` methods' documentation [4,5]
13231323
/// states that they are currently equivalent to `transmute`. [3]
13241324
///
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
13271327
///
13281328
/// [1] https://doc.rust-lang.org/nightly/std/primitive.f32.html#method.from_bits
13291329
/// [2] https://doc.rust-lang.org/nightly/std/primitive.f64.html#method.from_bits
@@ -1365,7 +1365,7 @@ safety_comment! {
13651365
}
13661366
safety_comment! {
13671367
/// SAFETY:
1368-
/// TODO(#61): Add quotes
1368+
/// TODO(#429): Add quotes
13691369
/// - `FromZeroes`, `AsBytes`, `Unaligned`: Per the reference [1], `str` has
13701370
/// the same layout as `[u8]`, and `[u8]` is `FromZeroes`, `AsBytes`, and
13711371
/// `Unaligned`.
@@ -1381,7 +1381,7 @@ safety_comment! {
13811381
// `NonZeroXxx` is `AsBytes`, but not `FromZeroes` or `FromBytes`.
13821382
//
13831383
/// SAFETY:
1384-
/// TODO(#61): Add quotes
1384+
/// TODO(#429): Add quotes
13851385
/// - `AsBytes`: `NonZeroXxx` has the same layout as its associated
13861386
/// primitive. Since it is the same size, this guarantees it has no
13871387
/// padding - integers have no padding, and there's no room for padding
@@ -1416,7 +1416,7 @@ safety_comment! {
14161416
}
14171417
safety_comment! {
14181418
/// SAFETY:
1419-
/// TODO(#61): Add quotes
1419+
/// TODO(#429): Add quotes
14201420
/// - `FromZeroes`, `FromBytes`, `AsBytes`: The Rust compiler reuses `0`
14211421
/// value to represent `None`, so `size_of::<Option<NonZeroXxx>>() ==
14221422
/// size_of::<xxx>()`; see `NonZeroXxx` documentation.
@@ -1470,7 +1470,7 @@ safety_comment! {
14701470
}
14711471
safety_comment! {
14721472
/// SAFETY:
1473-
/// TODO(#61): Add quotes
1473+
/// TODO(#429): Add quotes
14741474
/// `Wrapping<T>` is guaranteed by its docs [1] to have the same layout as
14751475
/// `T`. Also, `Wrapping<T>` is `#[repr(transparent)]`, and has a single
14761476
/// field, which is `pub`. Per the reference [2], this means that the
@@ -1512,7 +1512,7 @@ safety_comment! {
15121512
}
15131513
safety_comment! {
15141514
/// SAFETY:
1515-
// TODO(#61): Add reference to docs + quotes
1515+
// TODO(#429): Add reference to docs + quotes
15161516
/// `ManuallyDrop` has the same layout as `T`, and accessing the inner value
15171517
/// is safe (meaning that it's unsound to leave the inner value
15181518
/// uninitialized while exposing the `ManuallyDrop` to safe code).

0 commit comments

Comments
 (0)