Skip to content

Commit 2f7bf40

Browse files
authored
Merge pull request #475 from GrigorenkoPV/typos
Fix some typos
2 parents 50f8ff4 + afce5fc commit 2f7bf40

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

Diff for: reference/src/glossary.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ It can also be a physical address for bare-level / kernel code. Rust doesn't rea
145145
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.
146146

147147
Note that a pointer in Rust is *not* just a memory address.
148-
A pointer value consists of a memory address and [provenance][pointer-provenance].
148+
A pointer value consists of a memory address and [provenance][provenance].
149149

150150
### Niche
151151
[niche]: #niche

Diff for: reference/src/layout/scalars.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ For all Rust's fixed-width integer types `{i,u}{8,16,32,64,128}` it holds that:
7878
* negative values of signed integer types are represented using 2's complement.
7979

8080
Furthermore, Rust's signed and unsigned fixed-width integer types
81-
`{i,u}{8,16,32,64}` have the same layout the C fixed-width integer types from
81+
`{i,u}{8,16,32,64}` have the same layout as the C fixed-width integer types from
8282
the `<stdint.h>` header `{u,}int{8,16,32,64}_t`. These fixed-width integer types
8383
are therefore safe to use directly in C FFI where the corresponding C
8484
fixed-width integer types are expected.

Diff for: reference/src/layout/unions.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ assert_eq!(size_of::<U>(), 2);
170170
```
171171

172172
**C++ compatibility hazard**: C++ does, in general, give a size of 1 to types
173-
with no fields. When such types are used as an union field in C++, a "naive"
173+
with no fields. When such types are used as a union field in C++, a "naive"
174174
translation of that code into Rust will not produce a compatible result. Refer
175175
to the [struct chapter](structs-and-tuples.md#c-compatible-layout-repr-c) for
176176
further details.

Diff for: reference/src/validity/unions.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ represents the consensus from issue [#73]. The statements in here are not (yet)
77
## Validity of unions with zero-sized fields
88

99
A union containing a zero-sized field can contain any bit pattern. An example of such
10-
an union is [`MaybeUninit`].
10+
a union is [`MaybeUninit`].
1111

1212
[#73]: https://github.com/rust-lang/unsafe-code-guidelines/issues/73
1313
[`MaybeUninit`]: https://doc.rust-lang.org/std/mem/union.MaybeUninit.html

0 commit comments

Comments
 (0)