Suggest pin::pin!
over Box::pin
in diagnostics
#109964
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Code
Consider the following code, taken from the async book (playground):
Current output
Desired output
Rationale and extra context
Local pin construction was stabilized in Rust 1.68. We should update the diagnostics to suggest this instead of the more expensive
Box::pin
call.Other cases
No response
Anything else?
cc/ @wg-async
This is probably a "good first issue" as well. If someone can tag it as such?
The text was updated successfully, but these errors were encountered: