@@ -66,7 +66,7 @@ reference does not change the layout.
66
66
67
67
Pointers to sized types have the same size and alignment as ` usize ` .
68
68
69
- Pointers to unsized types are sized. The size and alignemnt is guaranteed to be
69
+ Pointers to unsized types are sized. The size and alignment is guaranteed to be
70
70
at least equal to the size and alignment of a pointer.
71
71
72
72
> Note: Though you should not rely on this, all pointers to <abbr
@@ -88,7 +88,7 @@ Slices have the same layout as the section of the array they slice.
88
88
89
89
## Tuple Layout
90
90
91
- Tuples do not have any guarantes about their layout.
91
+ Tuples do not have any guarantees about their layout.
92
92
93
93
The exception to this is the unit tuple (` () ` ) which is guaranteed as a
94
94
zero-sized type to have a size of 0 and an alignment of 1.
@@ -170,7 +170,7 @@ is now. Then increase the current offset by the size of the field.
170
170
Finally, the size of the struct is the current offset rounded up to the nearest
171
171
multiple of the struct's alignment.
172
172
173
- Here is this algorithm described in psudeocode .
173
+ Here is this algorithm described in pseudocode .
174
174
175
175
``` rust,ignore
176
176
struct.alignment = struct.fields().map(|field| field.alignment).max();
@@ -238,7 +238,7 @@ the default `enum` size and alignment for the target platform's C ABI.
238
238
> mostly a ` typedef ` plus some named constants; in other words, an object of an
239
239
> ` enum ` type can hold any integer value. For example, this is often used for
240
240
> bitflags in ` C ` . In contrast, Rust’s C-like enumerations can only legally hold
241
- > the discrimnant values, everything else is undefined behaviour. Therefore,
241
+ > the discriminant values, everything else is undefined behaviour. Therefore,
242
242
> using a C-like enumeration in FFI to model a C ` enum ` is often wrong.
243
243
244
244
It is an error for [ zero-variant enumerations] to have the ` C ` representation.
0 commit comments