Skip to content

Commit 092f139

Browse files
y86-devojeda
andauthored
Apply Miguel's suggestions
Co-authored-by: Miguel Ojeda <[email protected]>
1 parent dd125b2 commit 092f139

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/2025h1/field-projections.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ Finalize the [Field Projections RFC] and implement it for use in nightly.
1414

1515
## Motivation
1616

17-
Rust programs often makes use of custom pointer/reference types (for example `Arc<T>`) instead of
17+
Rust programs often make use of custom pointer/reference types (for example `Arc<T>`) instead of
1818
using plain references. In addition, container types are used to add or remove invariants on objects
19-
(for example `MaybeUninit<T>`). These types have significantly less ergonomics when trying to
19+
(for example `MaybeUninit<T>`). These types have significantly worse ergonomics when trying to
2020
operate on fields of the contained types compared to references.
2121

2222
### The status quo
@@ -33,14 +33,14 @@ ergonomic use of `NonNull<T>` over `*mut T` for accessing fields.
3333

3434
In the following sections, we will cover the basic usage first. And then we will go over the most
3535
complex version that is required for [pin projections] as well as allowing custom projections such
36-
as the abstraction for RCU from the Rust for Linux project (also given below).
36+
as the abstraction for RCU from the Rust for Linux project.
3737

3838
[pin projections]: https://doc.rust-lang.org/std/pin/index.html#projections-and-structural-pinning
3939
[Pin projections]: https://doc.rust-lang.org/std/pin/index.html#projections-and-structural-pinning
4040

4141
#### Ergonomic Pointer-to-Field Operations
4242

43-
We will use the struct from the summary as a simple example:
43+
We will use the struct from the RFC's summary as a simple example:
4444

4545
```rust
4646
struct Foo {
@@ -68,7 +68,7 @@ can thus not be written using a single generic function. For this reason, many p
6868
pointers even though `NonNull<T>` would be more fitting. The same can be said about `&mut
6969
MaybeUninit<T>`.
7070

71-
Field projection is adding a new operator that allows types to provide operations generic over the
71+
Field projection adds a new operator that allows types to provide operations generic over the
7272
fields of structs. For example, one can use the field projections on `MaybeUninit<T>` to safely
7373
initialize `Foo`:
7474

0 commit comments

Comments
 (0)