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 8 pull requests #83562

Closed
wants to merge 18 commits into from

Commits on Mar 22, 2021

  1. Configuration menu
    Copy the full SHA
    6e9cea9 View commit details
    Browse the repository at this point in the history

Commits on Mar 23, 2021

  1. android: set abort message

    Android has the ability to supply an abort message [1]. This message is
    automatically included in the debug trace, which helps debugging [2].
    Modify panic_abort to populate this message before calling abort().
    
    [1] https://android.googlesource.com/platform/bionic/+/master/libc/include/android/set_abort_message.h
    [2] https://source.android.com/devices/tech/debug/native-crash
    tweksteen committed Mar 23, 2021
    Configuration menu
    Copy the full SHA
    f41d0a4 View commit details
    Browse the repository at this point in the history

Commits on Mar 24, 2021

  1. rustdoc: Use diagnostics for error when including sources

    This error probably almost never happens, but we should still use the
    diagnostic infrastructure. My guess is that the error was added back
    before rustdoc used the rustc diagnostic infrastructure (it was all
    `println!` and `eprintln!` back then!) and since it likely rarely occurs
    and this code doesn't change that much, no one thought to transition it
    to using diagnostics.
    
    Note that the old error was actually a warning (it didn't stop the rest
    of doc building). It seems very unlikely that this would fail without
    the rest of the doc build failing, so it makes more sense for it to be a
    hard error.
    
    The error looks like this:
    
        error: failed to render source code for `src/test/rustdoc/smart-punct.rs`: "bar": foo
          --> src/test/rustdoc/smart-punct.rs:3:1
           |
        3  | / #![crate_name = "foo"]
        4  | |
        5  | | //! This is the "start" of the 'document'! How'd you know that "it's" ...
        6  | | //!
        ...  |
        22 | | //! I say "don't smart-punct me -- please!"
        23 | | //! ```
           | |_______^
    
    I wasn't sure how to trigger the error, so to create that message I
    temporarily made rustdoc always emit it. That's also why it says "bar"
    and "foo" instead of a real error message.
    
    Note that the span of the diagnostic starts at line 3 because line 1 of
    that file is a (non-doc) comment and line 2 is a blank line.
    camelid committed Mar 24, 2021
    Configuration menu
    Copy the full SHA
    3d8ce0a View commit details
    Browse the repository at this point in the history

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 <ijackson@chiark.greenend.org.uk>
    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 26, 2021

  1. reduce threads spawned by ui-tests

    the test harness already spawns enough tests for all cores, individual
    tests should keep their own threading to a minimum to avoid context switch
    overhead
    
    some tests fail with 1 CGU, so explicit compile flags have been added
    to keep their old behavior
    
    # Conflicts:
    #	src/test/ui/asm/sym.rs
    the8472 committed Mar 26, 2021
    Configuration menu
    Copy the full SHA
    be7fe62 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    addc51a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5ac917d 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
    77a5fe9 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#81469 - tweksteen:android_set_message, r=m-…

    …ou-se
    
    android: set abort message
    
    Android has the ability to supply an abort message [1]. This message is
    automatically included in the debug trace, which helps debugging [2].
    Modify panic_abort to populate this message before calling abort().
    
    [1] https://android.googlesource.com/platform/bionic/+/master/libc/include/android/set_abort_message.h
    [2] https://source.android.com/devices/tech/debug/native-crash
    Dylan-DPC committed Mar 27, 2021
    Configuration menu
    Copy the full SHA
    f8bf349 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#81942 - the8472:reduce-ui-test-threads, r=M…

    …ark-Simulacrum
    
    reduce threads spawned by ui-tests
    
    The test harness already spawns enough tests to keep all cores busy.
    Individual tests should keep their own threading to a minimum to avoid context switch overhead.
    
    When running ui tests with lld enabled this shaves about 10% off that testsuite on my machine.
    
    Resolves rust-lang#81946
    Dylan-DPC committed Mar 27, 2021
    Configuration menu
    Copy the full SHA
    a9dac65 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#82626 - lcnr:encode_with_shorthandb, r=este…

    …bank
    
    update array missing `IntoIterator` msg
    
    fixes rust-lang#82602
    
    r? `@estebank` do you know whether we can use the expr span in `rustc_on_unimplemented`? The label isn't too great rn
    Dylan-DPC committed Mar 27, 2021
    Configuration menu
    Copy the full SHA
    3ac09e5 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#82993 - camelid:source-use-diag, r=jyn514

    rustdoc: Use diagnostics for error when including sources
    
    This error probably almost never happens, but we should still use the
    diagnostic infrastructure. My guess is that the error was added back
    before rustdoc used the rustc diagnostic infrastructure (it was all
    `println!` and `eprintln!` back then!) and since it likely rarely occurs
    and this code doesn't change that much, no one thought to transition it
    to using diagnostics.
    
    Note that the old error was actually a warning (it didn't stop the rest
    of doc building). It seems very unlikely that this would fail without
    the rest of the doc build failing, so it makes more sense for it to be a
    hard error.
    
    The error looks like this:
    
        error: failed to render source code for `src/test/rustdoc/smart-punct.rs`: "bar": foo
          --> src/test/rustdoc/smart-punct.rs:3:1
           |
        3  | / #![crate_name = "foo"]
        4  | |
        5  | | //! This is the "start" of the 'document'! How'd you know that "it's" ...
        6  | | //!
        ...  |
        22 | | //! I say "don't smart-punct me -- please!"
        23 | | //! ```
           | |_______^
    
    I wasn't sure how to trigger the error, so to create that message I
    temporarily made rustdoc always emit it. That's also why it says "bar"
    and "foo" instead of a real error message.
    
    Note that the span of the diagnostic starts at line 3 because line 1 of
    that file is a (non-doc) comment and line 2 is a blank line.
    Dylan-DPC committed Mar 27, 2021
    Configuration menu
    Copy the full SHA
    c1dc467 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#83130 - clarfonthey:escape, r=m-ou-se

    escape_ascii take 2
    
    The previous PR, rust-lang#73111 was closed for inactivity; since I've had trouble in the past reopening closed PRs, I'm just making a new one.
    
    I'm still running the tests locally but figured I'd open the PR in the meantime. Will fix whatever errors show up so we don't have to wait again for this.
    
    r? `@m-ou-se`
    Dylan-DPC committed Mar 27, 2021
    Configuration menu
    Copy the full SHA
    118a52b View commit details
    Browse the repository at this point in the history
  9. 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`
    Dylan-DPC committed Mar 27, 2021
    Configuration menu
    Copy the full SHA
    01038fa View commit details
    Browse the repository at this point in the history
  10. 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.
    Dylan-DPC committed Mar 27, 2021
    Configuration menu
    Copy the full SHA
    6f86712 View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#83526 - klensy:lazy-too, r=petrochenkov

    lazily calls some fns
    
    Replaced some fn's with it's lazy variants.
    Dylan-DPC committed Mar 27, 2021
    Configuration menu
    Copy the full SHA
    7d59791 View commit details
    Browse the repository at this point in the history