-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.C-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.T-langRelevant to the language teamRelevant to the language team
Description
A type T
with #[must_use]
does not imply that Pin<T>
is #[must_use]
. This means that there is no hint to .await
a Pin<Box<dyn Future>>
, which is one of the current workarounds for the lack of aysnc fn
in traits. This is used by async-trait
in its expansion, and in some crates that have traits that "ought to" have async fn
s.
See also #39524, which would propagate must_use
"everywhere" but was rejected, and #62228, which special-cased must_use
propagation through Box
only.
cc @varkor, who indicated they would provide mentoring advice.
jkugelman, athre0z and kornelski
Metadata
Metadata
Assignees
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.C-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.T-langRelevant to the language teamRelevant to the language team