-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Add a distinct error code and description for "main function has wron… #38819
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
Conversation
r? @arielb1 (rust_highfive has picked a reviewer for you, use r? to override) |
6e05542
to
9231421
Compare
} | ||
``` | ||
|
||
If you to get command-line arguments, use `std::env::args`. To exit with a |
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.
If you to [...]
missing verb?
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.
Absolutely.
87cdd7e
to
616c916
Compare
Updated. |
} | ||
``` | ||
|
||
The `main` function prototype should always be the following: |
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.
Rust doesn't have function prototypes so this term is sort of out of the blue. I think showing the correct shape of the function as in the next code example is fine.
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.
Less is more I guess. ;)
616c916
to
f0b6001
Compare
Updated. |
Anyone? 😢 |
@GuillaumeGomez - it looks good, but I was curious - why did the error number change?
|
Because the error changed. That's the main purpose of this PR. ;) |
@jonathandturner: Anything else I need to do? |
@GuillaumeGomez sorry, I thought you had repurposed an older one. Looks good. @bors r+ |
📌 Commit f0b6001 has been approved by |
⌛ Testing commit f0b6001 with merge 9161339... |
💔 Test failed - status-travis |
@bors: retry |
⌛ Testing commit f0b6001 with merge 3104cb2... |
💔 Test failed - status-travis |
Tidy failures
|
Damn... We waited for too long and a new error code has been added... I'll update the error code number tomorrow... |
f0b6001
to
97b9c8b
Compare
I replaced E0579 with E0580. I'll r+, don't hesitate to r- @jonathandturner if you see anything. @bors: r+ |
📌 Commit 97b9c8b has been approved by |
…meGomez Add a distinct error code and description for "main function has wron… …g type"
☀️ Test successful - status-appveyor, status-travis |
…g type"