Add long error explanation for E0573#65234
Conversation
|
Some changes occurred in diagnostic error codes |
|
r? @estebank (rust_highfive has picked a reviewer for you, use r? to override) |
|
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
9c59e3a to
f2255b4
Compare
|
☔ The latest upstream changes (presumably #65454) made this pull request unmergeable. Please resolve the merge conflicts. |
f2255b4 to
33779fb
Compare
|
r? @kinnison |
kinnison
left a comment
There was a problem hiding this comment.
Mostly good, just a couple of language tweaks I think might be worth it.
src/librustc_resolve/error_codes.rs
Outdated
There was a problem hiding this comment.
I'd suggest 'other' rather than 'else' here.
Something other than a type has been used when one was expected.
src/librustc_resolve/error_codes.rs
Outdated
There was a problem hiding this comment.
I'd suggest:
if we want to return the
Bornvariant from theDragonenum, we must make the
function return theDragonenum and not its variant:
33779fb to
ae4bbbb
Compare
|
Updated! |
src/librustc_resolve/error_codes.rs
Outdated
There was a problem hiding this comment.
This still doesn't quite read nicely.
If you replace 'we have set the function returning' with 'we must set the function to return' then it would read better.
ae4bbbb to
7d357fb
Compare
|
Updated. |
|
@bors: r=kinnison |
|
📌 Commit 7d357fb has been approved by |
…innison Add long error explanation for E0573 Part of #61137.
|
☀️ Test successful - checks-azure |
Tested on commit rust-lang/rust@7e49800. Direct link to PR: <rust-lang/rust#65234> 💔 rls on linux: test-pass → test-fail (cc @Xanewok, @rust-lang/infra).
| } | ||
| trait Isengard { | ||
| fn wizard(w: Wizard) { // error! |
There was a problem hiding this comment.
Hi, just a random late comment from an outsider... Should the // error! commet be removed because this is a corrected example, shouldn't it?
There was a problem hiding this comment.
Excellent point! We completely missed it... Do you want to send a PR to fix it?
…arkor Correctly note code as Ok not error for E0573 Hi, this is my first pull request to the Rust project. The fix is very small one just to fix an oversight in a comment. Namely, [this documentation PR](rust-lang#65234) added a longer explanation for E0573. It illustrated the error using erroneous/corrected contrasting examples. But it accidentally forgot to remove `// error` from the corrected example. Sadly, I found the error after the PR got merged. [As suggested by the original author](https://github.com/rust-lang/rust/pull/65234/files#r336518549) of the PR, I created an PR to fix this. Part of rust-lang#61137.
Part of #61137.