Skip to content

Commit 5a44243

Browse files
committed
Update references to issue google#61 to issue google#429
1 parent 49270e7 commit 5a44243

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
@@ -600,7 +600,7 @@ impl_known_layout!(const N: usize, T => [T; N]);
600600

601601
safety_comment! {
602602
/// SAFETY:
603-
// TODO(#61): Add reference to docs + quotes
603+
// TODO(#429): Add reference to docs + quotes
604604
/// `str` and `ManuallyDrop<[T]>` have the same representations as `[u8]`
605605
/// and `[T]` repsectively. `str` has different bit validity than `[u8]`,
606606
/// but that doesn't affect the soundness of this impl.
@@ -705,7 +705,7 @@ pub unsafe trait FromZeroes {
705705
let slf: *mut Self = self;
706706
let len = mem::size_of_val(self);
707707
// SAFETY:
708-
// TODO(#61): Add reference to docs + quotes
708+
// TODO(#429): Add reference to docs + quotes
709709
// - `self` is guaranteed by the type system to be valid for writes of
710710
// size `size_of_val(self)`.
711711
// - `u8`'s alignment is 1, and thus `self` is guaranteed to be aligned
@@ -1093,7 +1093,7 @@ pub unsafe trait AsBytes {
10931093
let slf: *const Self = self;
10941094

10951095
// SAFETY:
1096-
// TODO(#61): Add reference to docs + quotes
1096+
// TODO(#429): Add reference to docs + quotes
10971097
// - `slf.cast::<u8>()` is valid for reads for `len *
10981098
// mem::size_of::<u8>()` many bytes because...
10991099
// - `slf` is the same pointer as `self`, and `self` is a reference
@@ -1234,7 +1234,7 @@ safety_comment! {
12341234

12351235
safety_comment! {
12361236
/// SAFETY:
1237-
/// TODO(#61): Add quotes
1237+
/// TODO(#429): Add quotes
12381238
/// - `FromZeroes`, `FromBytes`: all bit patterns are valid for integers [1]
12391239
/// - `AsBytes`: integers have no padding bytes [1]
12401240
/// - `Unaligned` (`u8` and `i8` only): The reference [2] specifies the size
@@ -1270,8 +1270,8 @@ safety_comment! {
12701270
/// - `AsBytes`: the `{f32,f64}::to_bits` methods' documentation [4,5]
12711271
/// states that they are currently equivalent to `transmute`. [3]
12721272
///
1273-
/// TODO(#61): Make these arguments more precisely in terms of the documentation
1274-
/// TODO(#61): Add quotes
1273+
/// TODO(#429): Make these arguments more precisely in terms of the documentation
1274+
/// TODO(#429): Add quotes
12751275
///
12761276
/// [1] https://doc.rust-lang.org/nightly/std/primitive.f32.html#method.from_bits
12771277
/// [2] https://doc.rust-lang.org/nightly/std/primitive.f64.html#method.from_bits
@@ -1313,7 +1313,7 @@ safety_comment! {
13131313
}
13141314
safety_comment! {
13151315
/// SAFETY:
1316-
/// TODO(#61): Add quotes
1316+
/// TODO(#429): Add quotes
13171317
/// - `FromZeroes`, `AsBytes`, `Unaligned`: Per the reference [1], `str` has
13181318
/// the same layout as `[u8]`, and `[u8]` is `FromZeroes`, `AsBytes`, and
13191319
/// `Unaligned`.
@@ -1329,7 +1329,7 @@ safety_comment! {
13291329
// `NonZeroXxx` is `AsBytes`, but not `FromZeroes` or `FromBytes`.
13301330
//
13311331
/// SAFETY:
1332-
/// TODO(#61): Add quotes
1332+
/// TODO(#429): Add quotes
13331333
/// - `AsBytes`: `NonZeroXxx` has the same layout as its associated
13341334
/// primitive. Since it is the same size, this guarantees it has no
13351335
/// padding - integers have no padding, and there's no room for padding
@@ -1364,7 +1364,7 @@ safety_comment! {
13641364
}
13651365
safety_comment! {
13661366
/// SAFETY:
1367-
/// TODO(#61): Add quotes
1367+
/// TODO(#429): Add quotes
13681368
/// - `FromZeroes`, `FromBytes`, `AsBytes`: The Rust compiler reuses `0`
13691369
/// value to represent `None`, so `size_of::<Option<NonZeroXxx>>() ==
13701370
/// size_of::<xxx>()`; see `NonZeroXxx` documentation.
@@ -1418,7 +1418,7 @@ safety_comment! {
14181418
}
14191419
safety_comment! {
14201420
/// SAFETY:
1421-
/// TODO(#61): Add quotes
1421+
/// TODO(#429): Add quotes
14221422
/// `Wrapping<T>` is guaranteed by its docs [1] to have the same layout as
14231423
/// `T`. Also, `Wrapping<T>` is `#[repr(transparent)]`, and has a single
14241424
/// field, which is `pub`. Per the reference [2], this means that the
@@ -1460,7 +1460,7 @@ safety_comment! {
14601460
}
14611461
safety_comment! {
14621462
/// SAFETY:
1463-
// TODO(#61): Add reference to docs + quotes
1463+
// TODO(#429): Add reference to docs + quotes
14641464
/// `ManuallyDrop` has the same layout as `T`, and accessing the inner value
14651465
/// is safe (meaning that it's unsound to leave the inner value
14661466
/// uninitialized while exposing the `ManuallyDrop` to safe code).

0 commit comments

Comments
 (0)