News for hackers. Stuff that matters.
Re:Async-await on stable Rust by aliceryhl on Thursday November 07, 2019 @09:35AM (#21473523)
In Rust, it is normally not possible or at least very difficult to create structs where one field references another, and if you were to create a future that borrows some field, awaits a future, and uses the borrowed field, the resulting future will need to have a field with a reference to another.

This is the challenge and async await lets you make this kind of self referential types without unsafe code.

Re:Async-await on stable Rust by antisemiotic on Thursday November 07, 2019 @09:57AM (#21473718)
That's just the "Pin" type, which is heavily used in async code behind (and occasionally in front) the scenes, but is by no means restricted to it.
Re:Async-await on stable Rust by Nemo157 on Thursday November 07, 2019 @10:18AM (#21473911)
It's impossible to use the guarantees provided by the `Pin` type without `unsafe` code, except in `async fn`.