Skip to content
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

Rollup of 10 pull requests #83573

Merged
merged 20 commits into from
Mar 27, 2021
Merged

Rollup of 10 pull requests #83573

merged 20 commits into from
Mar 27, 2021

Commits on Mar 25, 2021

  1. ExitStatus: print "exit status: {}" rather than "exit code: {}"

    Proper Unix terminology is "exit status" (vs "wait status").  "exit
    code" is imprecise on Unix and therefore unclear.  (As far as I can
    tell, "exit code" is correct terminology on Windows.)
    
    This new wording is unfortunately inconsistent with the identifier
    names in the Rust stdlib.
    
    It is the identifier names that are wrong, as discussed at length in eg
      https://doc.rust-lang.org/nightly/std/process/struct.ExitStatus.html
      https://doc.rust-lang.org/nightly/std/os/unix/process/trait.ExitStatusExt.html
    
    Unfortunately for API stability reasons it would be a lot of work, and
    a lot of disruption, to change the names in the stdlib (eg to rename
    `std::process::ExitStatus` to `std::process::ChildStatus` or
    something), but we should fix the message output.  Many (probably
    most) readers of these messages about exit statuses will be users and
    system administrators, not programmers, who won't even know that Rust
    has this wrong terminology.
    
    So I think the right thing is to fix the documentation (as I have
    already done) and, now, the terminology in the implementation.
    
    This is a user-visible change to the behaviour of all Rust programs
    which run Unix subprocesses.  Hopefully no-one is matching against the
    exit status string, except perhaps in tests.
    
    Signed-off-by: Ian Jackson <[email protected]>
    ijackson committed Mar 25, 2021
    Configuration menu
    Copy the full SHA
    11e40ce View commit details
    Browse the repository at this point in the history

Commits on Mar 27, 2021

  1. lazily calls some fns

    klensy committed Mar 27, 2021
    Configuration menu
    Copy the full SHA
    229d199 View commit details
    Browse the repository at this point in the history
  2. format macro argument parsing fix

    When the character next to `{}` is "shifted" (when mapping a byte index
    in the format string to span) we should avoid shifting the span end
    index, so first map the index of `}` to span, then bump the span,
    instead of first mapping the next byte index to a span (which causes
    bumping the end span too much).
    
    Regression test added.
    
    Fixes rust-lang#83344
    osa1 committed Mar 27, 2021
    Configuration menu
    Copy the full SHA
    5b9bac2 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2afa4cc View commit details
    Browse the repository at this point in the history
  4. Fix Debug implementation for RwLock{Read,Write}Guard.

    This would attempt to print the Debug representation of the lock that
    the guard has locked, which will try to lock again, fail, and just print
    "<locked>" unhelpfully.
    
    After this change, this just prints the contents of the mutex, like the
    other smart pointers (and MutexGuard) do.
    m-ou-se committed Mar 27, 2021
    Configuration menu
    Copy the full SHA
    d730153 View commit details
    Browse the repository at this point in the history
  5. Derive Debug for io::Chain instead of manually implementing it.

    The manual implementation has the same bounds, so I don't think there's
    any reason for a manual implementation. The names used in the derive
    implementation are even nicer (`first`/`second`) than the manual
    implementation (`t`/`u`), and include the `done_first` field too.
    m-ou-se committed Mar 27, 2021
    Configuration menu
    Copy the full SHA
    7c01e6c View commit details
    Browse the repository at this point in the history
  6. Improve Debug implementations of Mutex and RwLock.

    They now show the poison flag and use debug_non_exhaustive.
    m-ou-se committed Mar 27, 2021
    Configuration menu
    Copy the full SHA
    5402abc View commit details
    Browse the repository at this point in the history
  7. Use detailed and shorter fs error explaination

    Includes suggestion from the8472 rust-lang#79390 (comment)
    
    More detail error explanation in fs doc
    pickfire committed Mar 27, 2021
    Configuration menu
    Copy the full SHA
    5495ce0 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    d5bcdd3 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    0927580 View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#79399 - pickfire:patch-3, r=JohnTitor

    Use detailed and shorter fs error explaination
    
    Includes suggestion from `@the8472` rust-lang#79390 (comment)
    JohnTitor authored Mar 27, 2021
    Configuration menu
    Copy the full SHA
    1f33a6a View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#83348 - osa1:issue83344, r=jackh726

    format macro argument parsing fix
    
    When the character next to `{}` is "shifted" (when mapping a byte index
    in the format string to span) we should avoid shifting the span end
    index, so first map the index of `}` to span, then bump the span,
    instead of first mapping the next byte index to a span (which causes
    bumping the end span too much).
    
    Regression test added.
    
    Fixes rust-lang#83344
    
    ---
    
    r? ```@estebank```
    JohnTitor authored Mar 27, 2021
    Configuration menu
    Copy the full SHA
    973fb4b View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#83462 - ijackson:exitstatus-message-wording…

    …, r=joshtriplett
    
    ExitStatus: print "exit status: {}" rather than "exit code: {}" on unix
    
    Proper Unix terminology is "exit status" (vs "wait status").  "exit
    code" is imprecise on Unix and therefore unclear.  (As far as I can
    tell, "exit code" is correct terminology on Windows.)
    
    This new wording is unfortunately inconsistent with the identifier
    names in the Rust stdlib.
    
    It is the identifier names that are wrong, as discussed at length in eg
      https://doc.rust-lang.org/nightly/std/process/struct.ExitStatus.html
      https://doc.rust-lang.org/nightly/std/os/unix/process/trait.ExitStatusExt.html
    
    Unfortunately for API stability reasons it would be a lot of work, and
    a lot of disruption, to change the names in the stdlib (eg to rename
    `std::process::ExitStatus` to `std::process::ChildStatus` or
    something), but we should fix the message output.  Many (probably
    most) readers of these messages about exit statuses will be users and
    system administrators, not programmers, who won't even know that Rust
    has this wrong terminology.
    
    So I think the right thing is to fix the documentation (as I have
    already done) and, now, the terminology in the implementation.
    
    This is a user-visible change to the behaviour of all Rust programs
    which run Unix subprocesses.  Hopefully no-one is matching against the
    exit status string, except perhaps in tests.
    JohnTitor authored Mar 27, 2021
    Configuration menu
    Copy the full SHA
    3f41fdd View commit details
    Browse the repository at this point in the history
  13. Rollup merge of rust-lang#83526 - klensy:lazy-too, r=petrochenkov

    lazily calls some fns
    
    Replaced some fn's with it's lazy variants.
    JohnTitor authored Mar 27, 2021
    Configuration menu
    Copy the full SHA
    fa70398 View commit details
    Browse the repository at this point in the history
  14. Rollup merge of rust-lang#83558 - m-ou-se:use-finish-non-exhaustive, …

    …r=jackh726
    
    Use DebugStruct::finish_non_exhaustive() in std.
    
    See rust-lang#67364
    JohnTitor authored Mar 27, 2021
    Configuration menu
    Copy the full SHA
    53cc806 View commit details
    Browse the repository at this point in the history
  15. Rollup merge of rust-lang#83559 - m-ou-se:rwlock-guard-debug-fix, r=j…

    …ackh726
    
    Fix Debug implementation for RwLock{Read,Write}Guard.
    
    This would attempt to print the Debug representation of the lock that the guard has locked, which will try to lock again, fail, and just print `"<locked>"` unhelpfully.
    
    After this change, this just prints the contents of the mutex, like the other smart pointers (and MutexGuard) do.
    
    MutexGuard had this problem too: rust-lang#57702
    JohnTitor authored Mar 27, 2021
    Configuration menu
    Copy the full SHA
    5dc29e1 View commit details
    Browse the repository at this point in the history
  16. Rollup merge of rust-lang#83560 - m-ou-se:io-chain-debug, r=sfackler

    Derive Debug for io::Chain instead of manually implementing it.
    
    This derives Debug for io::Chain instead of manually implementing it.
    
    The manual implementation has the same bounds, so I don't think there's any reason for a manual implementation. The names used in the derive implementation are even nicer (`first`/`second`) than the manual implementation (`t`/`u`), and include the `done_first` field too.
    JohnTitor authored Mar 27, 2021
    Configuration menu
    Copy the full SHA
    8ad5f21 View commit details
    Browse the repository at this point in the history
  17. Rollup merge of rust-lang#83561 - m-ou-se:lock-debug, r=jackh726

    Improve Debug implementations of Mutex and RwLock.
    
    This improves the Debug implementations of Mutex and RwLock.
    
    They now show the poison flag and use debug_non_exhaustive. (See rust-lang#67364.)
    JohnTitor authored Mar 27, 2021
    Configuration menu
    Copy the full SHA
    a800d7f View commit details
    Browse the repository at this point in the history
  18. Rollup merge of rust-lang#83567 - jonjensen:patch-1, r=GuillaumeGomez

    Update rustup cross-compilation docs link
    JohnTitor authored Mar 27, 2021
    Configuration menu
    Copy the full SHA
    69acaf3 View commit details
    Browse the repository at this point in the history
  19. Rollup merge of rust-lang#83569 - sjakobi:issue56445-regression-test,…

    … r=jackh726
    
    Add regression tests for rust-lang#56445
    
    Closes rust-lang#56445.
    JohnTitor authored Mar 27, 2021
    Configuration menu
    Copy the full SHA
    1ad7c52 View commit details
    Browse the repository at this point in the history