diff --git a/reference/src/glossary.md b/reference/src/glossary.md index ab9ebae0..c4a2c4cb 100644 --- a/reference/src/glossary.md +++ b/reference/src/glossary.md @@ -145,7 +145,7 @@ It can also be a physical address for bare-level / kernel code. Rust doesn't rea it's an address as understood by the CPU, it's what the load/store instructions need to identify where in memory to perform the load/store. Note that a pointer in Rust is *not* just a memory address. -A pointer value consists of a memory address and [provenance][pointer-provenance]. +A pointer value consists of a memory address and [provenance][provenance]. ### Niche [niche]: #niche diff --git a/reference/src/layout/scalars.md b/reference/src/layout/scalars.md index 79fa558e..babb4f46 100644 --- a/reference/src/layout/scalars.md +++ b/reference/src/layout/scalars.md @@ -78,7 +78,7 @@ For all Rust's fixed-width integer types `{i,u}{8,16,32,64,128}` it holds that: * negative values of signed integer types are represented using 2's complement. Furthermore, Rust's signed and unsigned fixed-width integer types -`{i,u}{8,16,32,64}` have the same layout the C fixed-width integer types from +`{i,u}{8,16,32,64}` have the same layout as the C fixed-width integer types from the `` header `{u,}int{8,16,32,64}_t`. These fixed-width integer types are therefore safe to use directly in C FFI where the corresponding C fixed-width integer types are expected. diff --git a/reference/src/layout/unions.md b/reference/src/layout/unions.md index 0f973b6d..42d55ee7 100644 --- a/reference/src/layout/unions.md +++ b/reference/src/layout/unions.md @@ -170,7 +170,7 @@ assert_eq!(size_of::(), 2); ``` **C++ compatibility hazard**: C++ does, in general, give a size of 1 to types -with no fields. When such types are used as an union field in C++, a "naive" +with no fields. When such types are used as a union field in C++, a "naive" translation of that code into Rust will not produce a compatible result. Refer to the [struct chapter](structs-and-tuples.md#c-compatible-layout-repr-c) for further details. diff --git a/reference/src/validity/unions.md b/reference/src/validity/unions.md index 86c95478..bc732ff0 100644 --- a/reference/src/validity/unions.md +++ b/reference/src/validity/unions.md @@ -7,7 +7,7 @@ represents the consensus from issue [#73]. The statements in here are not (yet) ## Validity of unions with zero-sized fields A union containing a zero-sized field can contain any bit pattern. An example of such -an union is [`MaybeUninit`]. +a union is [`MaybeUninit`]. [#73]: https://github.com/rust-lang/unsafe-code-guidelines/issues/73 [`MaybeUninit`]: https://doc.rust-lang.org/std/mem/union.MaybeUninit.html