Skip to content

Commit

Permalink
Merge pull request #3539 from 1eokim/patch-1
Browse files Browse the repository at this point in the history
chore: fix typo in Pin README
  • Loading branch information
ehuss authored Dec 11, 2023
2 parents dbdb738 + 672904f commit 94f8861
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion text/2349-pin.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Let's take that goal apart, piece by piece, from the perspective of the futures

- **Reference type**. The reason we need a reference type is that, when working with things like futures, we generally want to combine smaller futures into larger ones, and only at the top level put an entire resulting future into some immovable location. Thus, we need a reference type for methods like `poll`, so that we can break apart a large future into its smaller components, while retaining the guarantee about immobility.

- **Never to move before being dropped**. Again looking at the futures case, once we being `poll`ing a future, we want it to be able to store references into itself, which is possible if we can guarantee that the whole future will never move. We don't try to track *whether* such references exist at the type level, since that would involve cumbersome typestate; instead, we simply decree that by the time you initially `poll`, you promise to never move an immobile future again.
- **Never to move before being dropped**. Again looking at the futures case, once we begin `poll`ing a future, we want it to be able to store references into itself, which is possible if we can guarantee that the whole future will never move. We don't try to track *whether* such references exist at the type level, since that would involve cumbersome typestate; instead, we simply decree that by the time you initially `poll`, you promise to never move an immobile future again.

At the same time, we want to support futures (and iterators, etc.) that *can* move. While it's possible to do so by providing two distinct `Future` (or `Iterator`, etc) traits, such designs incur unacceptable ergonomic costs.

Expand Down

0 comments on commit 94f8861

Please sign in to comment.