-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Update Termination trait docs #94486
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Mark-Simulacrum (or someone else) soon. Please see the contribution instructions for more information. |
This comment has been minimized.
This comment has been minimized.
fb41124
to
b506127
Compare
r? @yaahc |
/// On the other hand, implementing Termination in no-std environment, where | ||
/// there is no notion of `exit status`, has no effect or may possibly cause bugs. |
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.
The issue isn't that it could lead to bugs, std::process::Termination
and std::process::exit
wouldn't be available in a no_std
binary so there would be no way to misuse it. I believe the issue that @Lokathor wanted to clarify was that Termination
is intended to be a piece of the standard library's runtime that is provided for convenience and should not be seen as a general requirement on what other runtime implementations must do.
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.
Yes. My concern is not that implementing Termination
is ever an error/bug. Instead, I would just like the docs to be clear that how the value is interpreted when it's returned from main
is not something to rely on in alternative runtimes.
@rustbot label: -S-waiting-on-review +S-waiting-on-author |
☔ The latest upstream changes (presumably #95215) made this pull request unmergeable. Please resolve the merge conflicts. |
from #93448.
I added a description to
Termination
trait docs, as mentioned in issue.