-
Notifications
You must be signed in to change notification settings - Fork 13k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New #[must_use]
behaviour for async methods does not apply to Pin<Box<dyn Future<Output = ()>>>
#111458
Comments
#[must_use]
behaviour for async methods does not apply to Pin<Box<dyn Future<Output = ()>>>
#[must_use]
behaviour for async methods does not apply to Pin<Box<dyn Future<Output = ()>>>
in traits
#[must_use]
behaviour for async methods does not apply to Pin<Box<dyn Future<Output = ()>>>
in traits#[must_use]
behaviour for async methods does not apply to Pin<Box<dyn Future<Output = ()>>>
We looked at this as the wg-async triage meeting today. We agree this is a bug and that the behavior should be consistent with This is also likely a good first issue for someone wanting to contribute to async. |
Would you say this is also a good issue for a first-time contributor to Rust? I'm not super familiar with the language, but I want to contribute to open source compilers, so I'm hoping to potentially take on this task. |
Can I take this ? |
Either one of you (@thosakwe or @tsafacjo) are welcome to work on this! If it's your first time contributing to Rust, it might take a while to ramp up on it, but I find the best way to do that is to just do it. If you decided to have a go at it, feel free to ask any questions you have either here or in #wg-async. I tend to watch #wg-async closer than GitHub issues, so you'll probably get a more prompt reply there. |
@tsafacjo this issue wasn't claimed so you are free to claim and work on it if you still are interested. Kindly comment with |
@rustbot claim |
This is also a very special case of #102238 |
Defining traits that contain methods that return such a type:
The compiler should probably have warned me about not using the
Output
of theFuture
, consistent with the behaviour of async functions in Rust 1.67.0. This will also work without the need for traits but async traits is one of the most common use cases for such a type.Meta
rustc --version --verbose
:Backtrace
The text was updated successfully, but these errors were encountered: