Skip to content

Commit 4b6eb0f

Browse files
committed
Update some wording making reference to issues/RFCs
1 parent 1fe5457 commit 4b6eb0f

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

src/exotic-sizes.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,10 +172,10 @@ of UB.
172172
There is [an accepted RFC][extern-types] to add proper types with an unknown size,
173173
called *extern types*, which would let Rust developers model things like C's `void*`
174174
and other "declared but never defined" types more accurately. However as of
175-
Rust 2018, the feature is stuck in limbo over how `size_of::<MyExternType>()`
176-
should behave.
175+
Rust 2018, [the feature is stuck in limbo over how `size_of_val::<MyExternType>()`
176+
should behave][extern-types-issue].
177177

178-
[dst-issue]: https://github.com/rust-lang/rust/issues/26403
179178
[extern-types]: https://github.com/rust-lang/rfcs/blob/master/text/1861-extern-types.md
179+
[extern-types-issue]: https://github.com/rust-lang/rust/issues/43467
180180
[`str`]: ../std/primitive.str.html
181181
[slice]: ../std/primitive.slice.html

src/other-reprs.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ reinterpreting values as a different type.
1515
We strongly recommend using [rust-bindgen][] and/or [cbindgen][] to manage your FFI
1616
boundaries for you. The Rust team works closely with those projects to ensure
1717
that they work robustly and are compatible with current and future guarantees
18-
about type layouts and reprs.
18+
about type layouts and `repr`s.
1919

2020
The interaction of `repr(C)` with Rust's more exotic data layout features must be
2121
kept in mind. Due to its dual purpose as "for FFI" and "for layout control",
@@ -92,7 +92,7 @@ manipulate its tag and fields. See [the RFC][really-tagged] for details.
9292
Adding an explicit `repr` to an enum suppresses the null-pointer
9393
optimization.
9494

95-
These reprs have no effect on a struct.
95+
These `repr`s have no effect on a struct.
9696

9797
## repr(packed)
9898

@@ -107,7 +107,8 @@ compiler might be able to paper over alignment issues with shifts and masks.
107107
However if you take a reference to a packed field, it's unlikely that the
108108
compiler will be able to emit code to avoid an unaligned load.
109109

110-
**[As of Rust 2018, this still can cause undefined behavior.][ub loads]**
110+
[As this can cause undefined behavior][ub loads], the lint has been implemented
111+
and it will become a hard error.
111112

112113
`repr(packed)` is not to be used lightly. Unless you have extreme requirements,
113114
this should not be used.

src/unchecked-uninit.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ also cannot use `&mut base_ptr.field` as that would be creating a
137137
reference. Thus, it is currently not possible to create a raw pointer to a field
138138
of a partially initialized struct, and also not possible to initialize a single
139139
field of a partially initialized struct. (a
140-
[solution to this problem](https://github.com/rust-lang/rfcs/pull/2582) is being
140+
[solution to this problem](https://github.com/rust-lang/rust/issues/64490) is being
141141
worked on).
142142

143143
One last remark: when reading old Rust code, you might stumble upon the

0 commit comments

Comments
 (0)