-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Add long error explanation for E0728 #65678
Conversation
Some changes occurred in diagnostic error codes |
async fn foo() { | ||
wake_and_yield_once().await // `await` is used within `async` context | ||
} | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add an example inside of an async
block, I'd say.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added an async
block example, what about?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great.
My last nitpick would be to have a link to the async/await documentation, but this is already a great improvement.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, at glance, we don't have the links to keywords in error code's explanations. I found the links to RFCs or specific topics. We should have a link to the async/await?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would lean towards over linking over under linking, but I'll defer to @GuillaumeGomez
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer to have the links indeed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, the link should be https://doc.rust-lang.org/std/keyword.async.html and https://doc.rust-lang.org/std/keyword.await.html ?
2750868
to
4fcc784
Compare
Once the links have been added, just r=me |
@bors r=GuilliaumeGomez rollup |
📌 Commit a1f6589 has been approved by |
🌲 The tree is currently closed for pull requests below priority 1000, this pull request will be tested once the tree is reopened |
…GuilliaumeGomez Add long error explanation for E0728 Part of rust-lang#61137 r? @GuillaumeGomez
Rollup of 14 pull requests Successful merges: - #64145 (Target-feature documented as unsafe) - #65007 (Mention keyword closing policy) - #65417 (Add more coherence tests) - #65507 (Fix test style in unused parentheses lint test) - #65591 (Add long error explanation for E0588) - #65617 (Fix WASI sleep impl) - #65656 (Add option to disable keyboard shortcuts in docs) - #65678 (Add long error explanation for E0728) - #65681 (Code cleanups following up on #65576.) - #65686 (refactor and move `maybe_append` ) - #65688 (Add some tests for fixed ICEs) - #65689 (bring back some Debug instances for Miri) - #65695 (self-profiling: Remove module names from some event-ids in codegen backend.) - #65706 (Add missing space in librustdoc) Failed merges: r? @ghost
Part of #61137
r? @GuillaumeGomez