3 ms·
Those subpar diagnostics are a bug. The underlying reasons are that - The async/await feature is an MVP - async/await desugars to code you can write yourself
by estebank 6y ago
Those subpar diagnostics are a bug. The underlying reasons are that
- The async/await feature is an MVP
- async/await desugars to code you can write yourself that leverages a bunch of relatively advanced features, namely trait bounds and associated types
- It also leverages a nightly only feature (generators)
- Async programming is inherently harder :)
- We've had less time to see how people misuse the features to see where they land in order to clean up those cases and make the errors as user friendly as they can be
Put all of those together and the experience of writing async code in Rust is similar to the experience of writing regular Rust code maybe two or three years ago. When you encounter things like this, please file a ticket at https://github.com/rust-lang/rust/issues https://github.com/rust-lang/rust/issues so that we can fix them.