Closed
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.