Skip to content

Document the default for ExitStatus #110863

Closed

Description

@jyn514

@scottmcm: I think it should at least say somewhere what that default is. Having it come from a derive(Default) on a c_int feels indirect to me as well, so perhaps it would make sense to define it manually in terms of ExitCode::SUCCESS instead, say -- that would also allow putting a doc-comment on the impl.

We should document that Default for ExitStatus is "process reported successful termination", ie the result of ExitCode::success().into(), and, implement it that way.

Originally posted by @ijackson in #106425 (comment)

Activity

  1. added
    T-libs-api[DEPRECATED; DO NOT USE]
    A-docsArea: Documentation for any part of the project, including the compiler, standard library, and tools
    on Apr 26, 2023
  2. added
    E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
    on Apr 26, 2023
  3. john-h-k commented on Apr 27, 2023

    @john-h-k
    Contributor

    Is this possible to currently do? Having checked out the linked issue it looks like it depends on impl Default for ExitStatus existing

  4. jyn514 commented on Apr 27, 2023

    @jyn514
    MemberAuthor

    Right, it needs #106425 to merge first.

  5. added
    S-blockedStatus: Blocked on something else such as an RFC or other implementation work.
    on Apr 27, 2023
  6. john-h-k commented on Apr 27, 2023

    @john-h-k
    Contributor

    Alright 👍 . How does documenting work for a derived trait?

  7. jyn514 commented on Apr 27, 2023

    @jyn514
    MemberAuthor

    You'd have to remove the derive and use manual impl Default blocks.

  8. ijackson commented on Apr 27, 2023

    @ijackson
    Contributor
  9. john-h-k commented on Apr 27, 2023

    @john-h-k
    Contributor

    Also just to check, It's ExitCode::SUCCESS.into() right? success() doesn't seem to be a method and doesn't seem to be being added by that issue (or should I add that method?)

    Also, should I open a PR (that is on top of the existing PR to actually add the default), or wait until the other is merged? Done the changes locally already

  10. ijackson commented on Apr 27, 2023

    @ijackson
    Contributor
  11. u-na-gi commented on Aug 22, 2023

    @u-na-gi

    @rustbot claim

  12. ijackson commented on Aug 22, 2023

    @ijackson
    Contributor

    Note #114593, which is a bit of a swamp. I think changing the docs can be done (at the cost of adding to the set of things which the docs claim to be true but which are false on those broken platforms) but changing the implementation ("and implement it that way") is blocked.

  13. john-h-k commented on Aug 22, 2023

    @john-h-k
    Contributor

    @rustbot claim

    I’ve already got a branch with this issue fixed on it - was waiting for the previous PR to merge and it now has. For some reason I forget to claim it though

  14. removed their assignment
    on Aug 23, 2023
  15. bkaestner commented on Oct 11, 2023

    @bkaestner
    Contributor

    Documented as of a741a5a within 1.73 via #114864 or am I mistaken?

  16. HerrCai0907 commented on Oct 20, 2023

    @HerrCai0907
    Contributor

    @rustbot claim

  17. john-h-k commented on Oct 20, 2023

    @john-h-k
    Contributor

    @rustbot claim

    It appears this has already been done - i mentioned a few comments back but I've already completed this - i was going to claim it but im awaiting an update on whether its already been finished

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.S-blockedStatus: Blocked on something else such as an RFC or other implementation work.T-libs-api[DEPRECATED; DO NOT USE]

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions