-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
(request) Extend #[must_use] to Pin #67387
Copy link
Copy link
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
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
Type
Fields
Give feedbackNo fields configured for issues without a type.
A type
Twith#[must_use]does not imply thatPin<T>is#[must_use]. This means that there is no hint to.awaitaPin<Box<dyn Future>>, which is one of the current workarounds for the lack ofaysnc fnin traits. This is used byasync-traitin its expansion, and in some crates that have traits that "ought to" haveasync fns.See also #39524, which would propagate
must_use"everywhere" but was rejected, and #62228, which special-casedmust_usepropagation throughBoxonly.cc @varkor, who indicated they would provide mentoring advice.