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 #93616

Closed
wants to merge 24 commits into from

Commits on Dec 27, 2021

  1. rustdoc: Fix ICE report

    ehuss committed Dec 27, 2021
    Configuration menu
    Copy the full SHA
    4413141 View commit details
    Browse the repository at this point in the history

Commits on Jan 1, 2022

  1. Stabilize -Z instrument-coverage as -C instrument-coverage

    Continue supporting -Z instrument-coverage for compatibility for now,
    but show a deprecation warning for it.
    
    Update uses and documentation to use the -C option.
    
    Move the documentation from the unstable book to stable rustc
    documentation.
    joshtriplett committed Jan 1, 2022
    Configuration menu
    Copy the full SHA
    34106f8 View commit details
    Browse the repository at this point in the history
  2. Rewrite instrument-coverage documentation to use LLVM tools directly

    llvm-tools-preview is still experimental, so document it as such, and
    don't use it in the examples.
    joshtriplett committed Jan 1, 2022
    Configuration menu
    Copy the full SHA
    760c13f View commit details
    Browse the repository at this point in the history
  3. Update instrument-coverage documentation to document stability and LL…

    …VM versions
    
    The instrument-coverage option is stable; the details of the profile
    data format are not.
    
    Recommend llvm-tools-preview as the preferred alternative to obtain a
    compatible version of the LLVM tools, rather than finding LLVM tools
    elsewhere.
    joshtriplett committed Jan 1, 2022
    Configuration menu
    Copy the full SHA
    c840003 View commit details
    Browse the repository at this point in the history
  4. Clarify stability expectations for llvm-tools-preview

    Co-authored-by: Mark Rousskov <mark.simulacrum@gmail.com>
    joshtriplett and Mark-Simulacrum committed Jan 1, 2022
    Configuration menu
    Copy the full SHA
    e14bd48 View commit details
    Browse the repository at this point in the history

Commits on Jan 2, 2022

  1. Require -Zunstable-options for -C instrument-coverage=except-* op…

    …tions
    
    These options primarily exist to work around bugs, and those bugs have
    largely been fixed. Avoid stabilizing them, so that we don't have to
    support them indefinitely.
    joshtriplett committed Jan 2, 2022
    Configuration menu
    Copy the full SHA
    6593fcd View commit details
    Browse the repository at this point in the history

Commits on Jan 12, 2022

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

Commits on Jan 31, 2022

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

Commits on Feb 2, 2022

  1. Make rustc use RUST_BACKTRACE=full by default

    Compiler panics should be rare - when they do occur, we want the report
    filed by the user to contain as much information as possible. This is
    especially important when the panic is due to an incremental compilation
    bug, since we may not have enough information to reproduce it.
    
    This PR sets `RUST_BACKTRACE=full` inside `rustc` if the user has not
    explicitly set `RUST_BACKTRACE`. This is more verbose than
    `RUST_BACKTRACE=1`, but this may make it easier to debug incremental
    compilation issues. Users who find this too verbose can still manually
    set `RUST_BACKTRACE` before invoking the compiler.
    
    This only affects `rustc` (and any tool using `rustc_driver::install_ice_hook`).
    It does *not* affect any user crates or the standard library -
    backtraces will continue to be off by default in any application
    *compiled* by rustc.
    Aaron1011 committed Feb 2, 2022
    Configuration menu
    Copy the full SHA
    891368f View commit details
    Browse the repository at this point in the history
  2. Use Option::then in two places

    est31 committed Feb 2, 2022
    Configuration menu
    Copy the full SHA
    08be313 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    1dbdfc4 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    088474a View commit details
    Browse the repository at this point in the history
  5. Add more *-unwind ABI variants

    The following *-unwind ABIs are now supported:
    - "C-unwind"
    - "cdecl-unwind"
    - "stdcall-unwind"
    - "fastcall-unwind"
    - "vectorcall-unwind"
    - "thiscall-unwind"
    - "aapcs-unwind"
    - "win64-unwind"
    - "sysv64-unwind"
    - "system-unwind"
    Amanieu committed Feb 2, 2022
    Configuration menu
    Copy the full SHA
    547b4e6 View commit details
    Browse the repository at this point in the history

Commits on Feb 3, 2022

  1. Configuration menu
    Copy the full SHA
    3b52cca View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#90132 - joshtriplett:stabilize-instrument-c…

    …overage, r=wesleywiser
    
    Stabilize `-Z instrument-coverage` as `-C instrument-coverage`
    
    (Tracking issue for `instrument-coverage`: rust-lang#79121)
    
    This PR stabilizes support for instrumentation-based code coverage, previously provided via the `-Z instrument-coverage` option. (Continue supporting `-Z instrument-coverage` for compatibility for now, but show a deprecation warning for it.)
    
    Many, many people have tested this support, and there are numerous reports of it working as expected.
    
    Move the documentation from the unstable book to stable rustc documentation. Update uses and documentation to use the `-C` option.
    
    Addressing questions raised in the tracking issue:
    
    > If/when stabilized, will the compiler flag be updated to -C instrument-coverage? (If so, the -Z variant could also be supported for some time, to ease migrations for existing users and scripts.)
    
    This stabilization PR updates the option to `-C` and keeps the `-Z` variant to ease migration.
    
    > The Rust coverage implementation depends on (and automatically turns on) -Z symbol-mangling-version=v0. Will stabilizing this feature depend on stabilizing v0 symbol-mangling first? If so, what is the current status and timeline?
    
    This stabilization PR depends on rust-lang#90128 , which stabilizes `-C symbol-mangling-version=v0` (but does not change the default symbol-mangling-version).
    
    > The Rust coverage implementation implements the latest version of LLVM's Coverage Mapping Format (version 4), which forces a dependency on LLVM 11 or later. A compiler error is generated if attempting to compile with coverage, and using an older version of LLVM.
    
    Given that LLVM 13 has now been released, requiring LLVM 11 for coverage support seems like a reasonable requirement. If people don't have at least LLVM 11, nothing else breaks; they just can't use coverage support. Given that coverage support currently requires a nightly compiler and LLVM 11 or newer, allowing it on a stable compiler built with LLVM 11 or newer seems like an improvement.
    
    The [tracking issue](rust-lang#79121) and the [issue label A-code-coverage](https://github.com/rust-lang/rust/labels/A-code-coverage) link to a few open issues related to `instrument-coverage`, but none of them seem like showstoppers. All of them seem like improvements and refinements we can make after stabilization.
    
    The original `-Z instrument-coverage` support went through a compiler-team MCP at rust-lang/compiler-team#278 . Based on that, `@pnkfelix` suggested that this needed a stabilization PR and a compiler-team FCP.
    matthiaskrgr authored Feb 3, 2022
    Configuration menu
    Copy the full SHA
    3681a40 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#92310 - ehuss:rustdoc-ice, r=estebank

    rustdoc: Fix ICE report
    
    The ICE report in rustdoc was confusing because it was returning an argument parse error:
    
    ```
    thread 'rustc' panicked at 'aborting due to `-Z treat-err-as-bug=1`', compiler/rustc_errors/src/lib.rs:1212:27
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
    
    error: internal compiler error: unexpected panic
    
    error: Unrecognized option: 'crate-version'
    ```
    
    This is because the ICE reporter was trying to parse the arguments as rustc, not rustdoc.  Since an argument error is a fatal error, it was early-exiting with the argument error due to unwinding.
    
    This changes it to be a more primitive scan of the arguments. The arguments being checked are pretty simple, and only have a small handful of forms that are easy to check for.
    
    It now looks like this:
    
    ```
    thread 'rustc' panicked at 'aborting due to `-Z treat-err-as-bug=1`', compiler/rustc_errors/src/lib.rs:1212:27
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
    
    error: internal compiler error: unexpected panic
    
    note: the compiler unexpectedly panicked. this is a bug.
    
    note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md
    
    note: rustc 1.59.0-dev running on x86_64-apple-darwin
    
    note: compiler flags: --crate-type lib -Z treat-err-as-bug
    
    note: some of the compiler flags provided by cargo are hidden
    
    query stack during panic:
    end of query stack
    ```
    
    It still says `rustc`, but I can live with that.
    matthiaskrgr authored Feb 3, 2022
    Configuration menu
    Copy the full SHA
    7f6acba View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#92802 - compiler-errors:deduplicate-stack-t…

    …race, r=oli-obk
    
    Deduplicate lines in long const-eval stack trace
    
    Lemme know if this is kinda overkill, lol.
    
    Fixes rust-lang#92796
    matthiaskrgr authored Feb 3, 2022
    Configuration menu
    Copy the full SHA
    a11629e View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#93515 - dtolnay:convenience, r=davidtwco

    Factor convenience functions out of main printer implementation
    
    The pretty printer in rustc_ast_pretty has a section of methods commented "Convenience functions to talk to the printer". This PR pulls those out to a separate module. This leaves pp.rs with only the minimal API that is core to the pretty printing algorithm.
    
    I found this separation to be helpful in https://github.com/dtolnay/prettyplease because it makes clear when changes are adding some fundamental new capability to the pretty printer algorithm vs just making it more convenient to call some already existing functionality.
    matthiaskrgr authored Feb 3, 2022
    Configuration menu
    Copy the full SHA
    2e9f0fa View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#93561 - Amanieu:more-unwind-abi, r=nagisa

    Add more *-unwind ABI variants
    
    The following *-unwind ABIs are now supported:
    - "C-unwind"
    - "cdecl-unwind"
    - "stdcall-unwind"
    - "fastcall-unwind"
    - "vectorcall-unwind"
    - "thiscall-unwind"
    - "aapcs-unwind"
    - "win64-unwind"
    - "sysv64-unwind"
    - "system-unwind"
    
    cc `@rust-lang/wg-ffi-unwind`
    matthiaskrgr authored Feb 3, 2022
    Configuration menu
    Copy the full SHA
    02873fa View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#93566 - Aaron1011:rustc-backtrace, r=davidtwco

    Make rustc use `RUST_BACKTRACE=full` by default
    
    Compiler panics should be rare - when they do occur, we want the report
    filed by the user to contain as much information as possible. This is
    especially important when the panic is due to an incremental compilation
    bug, since we may not have enough information to reproduce it.
    
    This PR sets `RUST_BACKTRACE=full` inside `rustc` if the user has not
    explicitly set `RUST_BACKTRACE`. This is more verbose than
    `RUST_BACKTRACE=1`, but this may make it easier to debug incremental
    compilation issues. Users who find this too verbose can still manually
    set `RUST_BACKTRACE` before invoking the compiler.
    
    This only affects `rustc` (and any tool using `rustc_driver::install_ice_hook`).
    It does *not* affect any user crates or the standard library -
    backtraces will continue to be off by default in any application
    *compiled* by rustc.
    matthiaskrgr authored Feb 3, 2022
    Configuration menu
    Copy the full SHA
    19e74d6 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#93589 - est31:option_then, r=cjgillot

    Use Option::then in two places
    matthiaskrgr authored Feb 3, 2022
    Configuration menu
    Copy the full SHA
    7dbb270 View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#93597 - GuillaumeGomez:update-browser-ui-te…

    …st, r=jsha
    
    Update browser-ui-test version
    
    The puppeteer version update is limited because new versions has some "interesting" flaws.
    
    r? `@jsha`
    matthiaskrgr authored Feb 3, 2022
    Configuration menu
    Copy the full SHA
    b0037f4 View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#93600 - last-partizan:fix-junit-formatter, …

    …r=yaahc
    
    fix: Remove extra newlines from junit output
    
    This PR fixes extra newline in junit output rust-lang#93454
    matthiaskrgr authored Feb 3, 2022
    Configuration menu
    Copy the full SHA
    1abc0da View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#93606 - JakobDegen:mischaracterized-preorde…

    …r, r=oli-obk
    
    Correct incorrect description of preorder traversals
    
    The internal documentation for the `Preorder` type gave an incorrect description (the description is not even correct for the example provided, since C is visited after one of its successors). This corrects the description, and adds in a sentence explaining more precisely how the traversals are performed.
    matthiaskrgr authored Feb 3, 2022
    Configuration menu
    Copy the full SHA
    d9c74a6 View commit details
    Browse the repository at this point in the history