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 5 pull requests #116671

Merged
merged 18 commits into from
Oct 12, 2023
Merged

Rollup of 5 pull requests #116671

merged 18 commits into from
Oct 12, 2023

Commits on Oct 10, 2023

  1. Rejig some top-level rustc_hir_pretty functions.

    There are several that are unused and can be removed.
    
    And there are some calls to `to_string`, which can be expressed more
    nicely as a `foo_to_string` call, and then `to_string` need not be
    `pub`. (This requires adding `pat_to_string`).
    nnethercote committed Oct 10, 2023
    Configuration menu
    Copy the full SHA
    b6b11c7 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    51e8c80 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    664b185 View commit details
    Browse the repository at this point in the history
  4. Tweak comments.

    - Remove an out-of-date comment. (There is no `PpAnn` implementation for `hir::Crate`.)
    - Remove a low-value comment.
    - And break a very long comment.
    nnethercote committed Oct 10, 2023
    Configuration menu
    Copy the full SHA
    494bc85 View commit details
    Browse the repository at this point in the history
  5. Fiddle with State functions.

    Remove and inline `new_from_input`, because it has a single call site.
    And move `attrs` into the earlier `impl` block.
    nnethercote committed Oct 10, 2023
    Configuration menu
    Copy the full SHA
    7d35902 View commit details
    Browse the repository at this point in the history

Commits on Oct 11, 2023

  1. Handle several #[diagnostic::on_unimplemented] attributes correctly

    This PR fixes an issues where rustc would ignore subsequent
    `#[diagnostic::on_unimplemented]` attributes. The [corresponding
    RFC](https://rust-lang.github.io/rfcs/3368-diagnostic-attribute-namespace.html)
    specifies that the first matching instance of each option is used.
    Invalid attributes are linted and otherwise ignored.
    weiznich committed Oct 11, 2023
    Configuration menu
    Copy the full SHA
    232aaeb View commit details
    Browse the repository at this point in the history

Commits on Oct 12, 2023

  1. Configuration menu
    Copy the full SHA
    a7ae2a6 View commit details
    Browse the repository at this point in the history
  2. coverage: Rename next_bcb to just bcb

    This is the only BCB that `TraverseCoverageGraphWithLoops::next` works with, so
    calling it `next_bcb` just makes the code less clear.
    Zalathar committed Oct 12, 2023
    Configuration menu
    Copy the full SHA
    d1920c5 View commit details
    Browse the repository at this point in the history
  3. coverage: Use a VecDeque for loop traversal worklists

    The previous code was storing the worklist in a vector, and then selectively
    adding items to the start or end of the vector. That's a perfect use-case for a
    double-ended queue.
    
    This change also reveals that the existing code was a bit confused about which
    end of the worklist is the front or back. For now, items are always removed
    from the front of the queue (instead of the back), and code that adds items to
    the queue has been flipped, to preserve the existing behaviour.
    Zalathar committed Oct 12, 2023
    Configuration menu
    Copy the full SHA
    ea3fb7b View commit details
    Browse the repository at this point in the history
  4. coverage: Store a graph reference in the graph traversal struct

    Having to keep passing in a graph reference was a holdover from when the graph
    was partly mutated during traversal. As of rust-lang#114354 that is no longer necessary,
    so we can simplify the traversal code by storing a graph reference as a field
    in `TraverseCoverageGraphWithLoops`.
    Zalathar committed Oct 12, 2023
    Configuration menu
    Copy the full SHA
    15360b3 View commit details
    Browse the repository at this point in the history
  5. coverage: Don't store loop backedges in the traversal context

    As long as we store the loop header BCB, we can look up its incoming loop
    backedges as needed.
    Zalathar committed Oct 12, 2023
    Configuration menu
    Copy the full SHA
    59f4f1c View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    d99ab97 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    8309097 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#116593 - tgross35:no-jump-tables-docs, r=co…

    …mpiler-errors
    
    Add unstable book page for the no-jump-tables codegen option
    
    See tracking issue: rust-lang#116592
    matthiaskrgr committed Oct 12, 2023
    Configuration menu
    Copy the full SHA
    54c528e View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#116625 - nnethercote:rustc_hir_pretty, r=fe…

    …e1-dead
    
    `rustc_hir_pretty` cleanups
    
    Just some improvements I found while looking through this code.
    
    r? ``@fee1-dead``
    matthiaskrgr committed Oct 12, 2023
    Configuration menu
    Copy the full SHA
    4b1867a View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#116642 - weiznich:diagnostic_on_unimplement…

    …ed_improvements, r=compiler-errors
    
    Handle several `#[diagnostic::on_unimplemented]` attributes correctly
    
    This PR fixes an issues where rustc would ignore subsequent `#[diagnostic::on_unimplemented]` attributes. The [corresponding RFC](https://rust-lang.github.io/rfcs/3368-diagnostic-attribute-namespace.html) specifies that the first matching instance of each option is used. Invalid attributes are linted and otherwise ignored.
    matthiaskrgr committed Oct 12, 2023
    Configuration menu
    Copy the full SHA
    5f90bee View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#116654 - Zalathar:reloop-traversal, r=oli-obk

    coverage: Clarify loop-edge detection and graph traversal
    
    This is a collection of improvements to two semi-related pieces of code:
    
    - The code in `counters` that detects which graph edges don't exit a loop, and would therefore be good candidates to have their coverage computed as an expression rather than having a physical counter.
    - The code in `graph` that traverses the coverage BCB graph in a particular order, and tracks loops and loop edges along the way (which is relevant to the above).
    
    I was originally only planning to make the `graph` changes, but there was going to be a lot of indentation churn in `counters` anyway, and once I started looking I noticed a lot of opportunities for simplification.
    
    ---
    
    `@rustbot` label +A-code-coverage
    matthiaskrgr committed Oct 12, 2023
    Configuration menu
    Copy the full SHA
    4832811 View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#116669 - ehuss:fix-platform-table, r=nikic

    Fix mips platform support entries.
    
    The table entries for these MIPS entries were broken because they had the wrong number of columns (from rust-lang#116503). Additionally, there was a conflict with rust-lang#115238, which made the same change (but on different lines, so git didn't complain).
    matthiaskrgr committed Oct 12, 2023
    Configuration menu
    Copy the full SHA
    6ccc521 View commit details
    Browse the repository at this point in the history