Skip to content

Conversation

mox692
Copy link
Contributor

@mox692 mox692 commented Mar 1, 2022

from #93448.

I added a description to Termination trait docs, as mentioned in issue.

@rust-highfive
Copy link
Contributor

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.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 1, 2022
@rust-log-analyzer

This comment has been minimized.

@mox692 mox692 force-pushed the update_termination_doc branch from fb41124 to b506127 Compare March 1, 2022 15:34
@Mark-Simulacrum
Copy link
Member

r? @yaahc

Comment on lines +2036 to +2037
/// 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.
Copy link
Member

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.

Copy link
Contributor

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.

@yaahc
Copy link
Member

yaahc commented Mar 7, 2022

@rustbot label: -S-waiting-on-review +S-waiting-on-author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 7, 2022
@bors
Copy link
Collaborator

bors commented Mar 22, 2022

☔ The latest upstream changes (presumably #95215) made this pull request unmergeable. Please resolve the merge conflicts.

@yaahc
Copy link
Member

yaahc commented Mar 23, 2022

Hey @mox692, someone else ended up coming along and claiming this issue as well and resolved it in #95207, so I'm going to go ahead and close this PR. Thank you again for the contribution and I'm sorry for the confusion and duplicated work :/

@yaahc yaahc closed this Mar 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants