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 17 pull requests #93138

Merged
merged 88 commits into from
Jan 21, 2022
Merged

Rollup of 17 pull requests #93138

merged 88 commits into from
Jan 21, 2022

Commits on Jan 13, 2022

  1. Configuration menu
    Copy the full SHA
    aa523a9 View commit details
    Browse the repository at this point in the history
  2. Fix typo in test

    CraftSpider committed Jan 13, 2022
    Configuration menu
    Copy the full SHA
    74f0e58 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a6aa3cb View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    aafcbf1 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    474e091 View commit details
    Browse the repository at this point in the history

Commits on Jan 18, 2022

  1. Add test case for rust-lang#57478

    eholk committed Jan 18, 2022
    Configuration menu
    Copy the full SHA
    4be32f8 View commit details
    Browse the repository at this point in the history
  2. Track drop points in generator_interior

    This change adds the basic infrastructure for tracking drop ranges in
    generator interior analysis, which allows us to exclude dropped types
    from the generator type.
    
    Not yet complete, but many of the async/await and generator tests pass.
    The main missing piece is tracking branching control flow (e.g. around
    an `if` expression). The patch does include support, however, for
    multiple yields in th e same block.
    
    Issue rust-lang#57478
    eholk committed Jan 18, 2022
    Configuration menu
    Copy the full SHA
    f712df8 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c4dee40 View commit details
    Browse the repository at this point in the history
  4. Make generator and async-await tests pass

    The main change needed to make this work is to do a pessimistic over-
    approximation for AssignOps. The existing ScopeTree analysis in
    region.rs works by doing both left to right and right to left order and
    then choosing the most conservative ordering. This behavior is needed
    because AssignOp's evaluation order depends on whether it is a primitive
    type or an overloaded operator, which runs as a method call.
    
    This change mimics the same behavior as region.rs in
    generator_interior.rs.
    
    Issue rust-lang#57478
    eholk committed Jan 18, 2022
    Configuration menu
    Copy the full SHA
    f664cfc View commit details
    Browse the repository at this point in the history
  5. Attribute drop to parent expression of the consume point

    This is needed to handle cases like `[a, b.await, c]`. `ExprUseVisitor`
    considers `a` to be consumed when it is passed to the array, but the
    array is not quite live yet at that point. This means we were missing
    the `a` value across the await point. Attributing drops to the parent
    expression means we do not consider the value consumed until the
    consuming expression has finished.
    
    Issue rust-lang#57478
    eholk committed Jan 18, 2022
    Configuration menu
    Copy the full SHA
    f246c0b View commit details
    Browse the repository at this point in the history
  6. Support conditional drops

    This adds support for branching and merging control flow and uses this
    to correctly handle the case where a value is dropped in one branch of
    an if expression but not another.
    
    There are other cases we need to handle, which will come in follow up
    patches.
    
    Issue rust-lang#57478
    eholk committed Jan 18, 2022
    Configuration menu
    Copy the full SHA
    aa029d4 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    9611770 View commit details
    Browse the repository at this point in the history
  8. Basic loop support

    eholk committed Jan 18, 2022
    Configuration menu
    Copy the full SHA
    298ca2f View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    4574152 View commit details
    Browse the repository at this point in the history
  10. More tracing and tests

    eholk committed Jan 18, 2022
    Configuration menu
    Copy the full SHA
    ba7d127 View commit details
    Browse the repository at this point in the history
  11. Revamped DropRange data structure

    Not currently working. Need to flow drop information.
    eholk committed Jan 18, 2022
    Configuration menu
    Copy the full SHA
    ff0e8f4 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    c7afaa1 View commit details
    Browse the repository at this point in the history
  13. Fix control flow handling in generator_interior

    All tests pass now! The issue was that we weren't handling all edges
    correctly, but now they are handled consistently.
    
    This includes code to dump a graphviz file for the CFG we built for drop
    tracking.
    
    Also removes old DropRanges tests.
    eholk committed Jan 18, 2022
    Configuration menu
    Copy the full SHA
    b39fb9b View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    904c270 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    5feb4d0 View commit details
    Browse the repository at this point in the history
  16. Update async-fn-nonsend.stderr

    eholk committed Jan 18, 2022
    Configuration menu
    Copy the full SHA
    46760b4 View commit details
    Browse the repository at this point in the history
  17. Add more comments

    eholk committed Jan 18, 2022
    Configuration menu
    Copy the full SHA
    006f547 View commit details
    Browse the repository at this point in the history
  18. Address code review comments

    1. Add test case for partial drops
    2. Simplify code in `propagate_to_fixpoint` and remove most clones
    3. Clean up PostOrderIndex creation
    eholk committed Jan 18, 2022
    Configuration menu
    Copy the full SHA
    30e1b1e View commit details
    Browse the repository at this point in the history
  19. Refactor drop_ranges

    Splits drop_ranges into drop_ranges::record_consumed_borrow,
    drop_ranges::cfg_build, and drop_ranges::cfg_propagate. The top level
    drop_ranges module has an entry point that does all the coordination of
    the other three phases, using code original in generator_interior.
    eholk committed Jan 18, 2022
    Configuration menu
    Copy the full SHA
    f5f98d7 View commit details
    Browse the repository at this point in the history
  20. Additional cleanup

    This cleans up the refactoring from the previous patch and cleans things
    up a bit. Each module has a clear entry point and everything else is
    private.
    eholk committed Jan 18, 2022
    Configuration menu
    Copy the full SHA
    9347bf4 View commit details
    Browse the repository at this point in the history
  21. Fixing formatting

    eholk committed Jan 18, 2022
    Configuration menu
    Copy the full SHA
    6a28afb View commit details
    Browse the repository at this point in the history
  22. Update stderr files

    eholk committed Jan 18, 2022
    Configuration menu
    Copy the full SHA
    7d82e4f View commit details
    Browse the repository at this point in the history
  23. More comments and refactoring

    The refactoring mainly keeps the separation between the modules clearer.
    For example, process_deferred_edges function moved to cfg_build.rs since
    that is really part of building the CFG, not finding the fixpoint.
    
    Also, we use PostOrderId instead of usize in a lot more places now.
    eholk committed Jan 18, 2022
    Configuration menu
    Copy the full SHA
    2af02cf View commit details
    Browse the repository at this point in the history
  24. Handle reinits in match guards

    eholk committed Jan 18, 2022
    Configuration menu
    Copy the full SHA
    4a70de7 View commit details
    Browse the repository at this point in the history
  25. Explicitly list all ExprKinds in cfg_build

    Also rearranges the existing arms to be more logical. For example, Break
    and Continue come closer to Loop now.
    eholk committed Jan 18, 2022
    Configuration menu
    Copy the full SHA
    6e281a7 View commit details
    Browse the repository at this point in the history
  26. Handle empty loops better

    eholk committed Jan 18, 2022
    Configuration menu
    Copy the full SHA
    a7df4e8 View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    7d11b33 View commit details
    Browse the repository at this point in the history
  28. Track changed bitsets in CFG propagation

    This reduces the amount of work done, especially in later iterations,
    by only processing nodes whose predecessors changed in the previous
    iteration, or earlier in the current iteration. This also has the side
    effect of completely ignoring all unreachable nodes.
    eholk committed Jan 18, 2022
    Configuration menu
    Copy the full SHA
    f730bd0 View commit details
    Browse the repository at this point in the history
  29. Handle uninhabited return types

    This changes drop range analysis to handle uninhabited return types such
    as `!`. Since these calls to these functions do not return, we model
    them as ending in an infinite loop.
    eholk committed Jan 18, 2022
    Configuration menu
    Copy the full SHA
    787f4cb View commit details
    Browse the repository at this point in the history
  30. Update async-fn-nonsend.rs

    The previous commit made the non_sync_with_method_call case pass due to
    the await being unreachable. Unfortunately, this isn't actually the
    behavior the test was verifying. This change lifts the panic into a
    helper function so that the generator analysis still thinks the await
    is reachable, and therefore we preserve the same testing behavior.
    eholk committed Jan 18, 2022
    Configuration menu
    Copy the full SHA
    887e843 View commit details
    Browse the repository at this point in the history
  31. drop_ranges: Add TrackedValue enum

    This makes it clearer what values we are tracking and why.
    eholk committed Jan 18, 2022
    Configuration menu
    Copy the full SHA
    78c5644 View commit details
    Browse the repository at this point in the history
  32. Safely handle partial drops

    We previously weren't tracking partial re-inits while being too
    aggressive around partial drops. With this change, we simply ignore
    partial drops, which is the safer, more conservative choice.
    eholk committed Jan 18, 2022
    Configuration menu
    Copy the full SHA
    32930d9 View commit details
    Browse the repository at this point in the history
  33. Respond to code review comments

    eholk committed Jan 18, 2022
    Configuration menu
    Copy the full SHA
    e0a5370 View commit details
    Browse the repository at this point in the history
  34. Use .. patterns in cfg_build.rs

    eholk committed Jan 18, 2022
    Configuration menu
    Copy the full SHA
    d840d0c View commit details
    Browse the repository at this point in the history
  35. Fix build after rebase

    eholk committed Jan 18, 2022
    Configuration menu
    Copy the full SHA
    76f6b57 View commit details
    Browse the repository at this point in the history

Commits on Jan 19, 2022

  1. Configuration menu
    Copy the full SHA
    2938be6 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    06b00ad View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    017747f View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    10858d2 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    f491a9f View commit details
    Browse the repository at this point in the history
  6. ⬆ chalk to 0.76.0

    pierwill committed Jan 19, 2022
    Configuration menu
    Copy the full SHA
    8d27c28 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    801ac0e View commit details
    Browse the repository at this point in the history
  8. src/test/rustdoc-json: Check for struct_fields in `variant_tuple_st…

    …ruct.rs`
    
    The presence of `struct_field`s is being checked for already in
    `variant_struct.rs`. We should also check for them in `variant_tuple_struct.rs`.
    Enselic committed Jan 19, 2022
    Configuration menu
    Copy the full SHA
    ab239cc View commit details
    Browse the repository at this point in the history
  9. Show a more informative panic message when DefPathHash does not exist

    This should hopefully make it easier to debug incremental compilation
    bugs like rust-lang#93096 without affecting performance.
    Aaron1011 committed Jan 19, 2022
    Configuration menu
    Copy the full SHA
    70d36a0 View commit details
    Browse the repository at this point in the history

Commits on Jan 20, 2022

  1. Configuration menu
    Copy the full SHA
    eec6016 View commit details
    Browse the repository at this point in the history
  2. Grow scan_stack in the conventional direction

    The pretty printer algorithm involves 2 VecDeques: a ring-buffer of
    tokens and a deque of ring-buffer indices. Confusingly, those two deques
    were being grown in opposite directions for no good reason. Ring-buffer
    pushes would go on the "back" of the ring-buffer (i.e. higher indices)
    while scan_stack pushes would go on the "front" (i.e. lower indices).
    This commit flips the scan_stack accesses to grow the scan_stack and
    ring-buffer in the same direction, where push does the same
    operation as a Vec push i.e. inserting on the high-index end.
    dtolnay committed Jan 20, 2022
    Configuration menu
    Copy the full SHA
    d81740e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d981c5b View commit details
    Browse the repository at this point in the history
  4. Simplify left_total tracking

    dtolnay committed Jan 20, 2022
    Configuration menu
    Copy the full SHA
    351011e View commit details
    Browse the repository at this point in the history
  5. Simplify advance_left

    dtolnay committed Jan 20, 2022
    Configuration menu
    Copy the full SHA
    d2eb46c View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    ae75ba6 View commit details
    Browse the repository at this point in the history
  7. Combine advance_left matches

    dtolnay committed Jan 20, 2022
    Configuration menu
    Copy the full SHA
    ea23a1f View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    d5f15a8 View commit details
    Browse the repository at this point in the history
  9. Touch up print_string

    dtolnay committed Jan 20, 2022
    Configuration menu
    Copy the full SHA
    65dd670 View commit details
    Browse the repository at this point in the history
  10. Eliminate offset number from Fits frames

    PrintStackElems with pbreak=PrintStackBreak::Fits always carried a
    meaningless value offset=0. We can combine the two types PrintStackElem
    + PrintStackBreak into one PrintFrame enum that stores offset only for
    Broken frames.
    dtolnay committed Jan 20, 2022
    Configuration menu
    Copy the full SHA
    9e794d7 View commit details
    Browse the repository at this point in the history
  11. Inline indent function

    dtolnay committed Jan 20, 2022
    Configuration menu
    Copy the full SHA
    224536f View commit details
    Browse the repository at this point in the history
  12. Inline print_newline function

    dtolnay committed Jan 20, 2022
    Configuration menu
    Copy the full SHA
    51eeb82 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    21c1571 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    dcb0721 View commit details
    Browse the repository at this point in the history
  15. rustdoc: auto create output directory when "--output-format json"

    This PR allows rustdoc to automatically create output directory in case
    it does not exist (when run with `--output-format json`).
    
    This fixes rustdoc crash:
    
    ````
    $ rustdoc --output-format json -Z unstable-options src/main.rs
    error: couldn't generate documentation: No such file or directory (os error 2)
      |
      = note: failed to create or modify "doc/main.json"
    
    error: aborting due to previous error
    ````
    
    With this fix behavior of `rustdoc --output-format json` becomes consistent
    with `rustdoc --output-format html` (which already auto-creates output
    directory if it's missing)
    tomkris committed Jan 20, 2022
    Configuration menu
    Copy the full SHA
    4e17170 View commit details
    Browse the repository at this point in the history
  16. update comments

    lcnr committed Jan 20, 2022
    Configuration menu
    Copy the full SHA
    c29b637 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    855c176 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    682ef4d View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    fd005f5 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    caec4a2 View commit details
    Browse the repository at this point in the history
  21. More clean up

    GuillaumeGomez committed Jan 20, 2022
    Configuration menu
    Copy the full SHA
    b0df765 View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    028a3e7 View commit details
    Browse the repository at this point in the history
  23. Rollup merge of rust-lang#91032 - eholk:generator-drop-tracking, r=ni…

    …komatsakis
    
    Introduce drop range tracking to generator interior analysis
    
    This PR addresses cases such as this one from rust-lang#57478:
    ```rust
    struct Foo;
    impl !Send for Foo {}
    
    let _: impl Send = || {
        let guard = Foo;
        drop(guard);
        yield;
    };
    ```
    
    Previously, the `generator_interior` pass would unnecessarily include the type `Foo` in the generator because it was not aware of the behavior of `drop`. We fix this issue by introducing a drop range analysis that finds portions of the code where a value is guaranteed to be dropped. If a value is dropped at all suspend points, then it is no longer included in the generator type. Note that we are using "dropped" in a generic sense to include any case in which a value has been moved. That is, we do not only look at calls to the `drop` function.
    
    There are several phases to the drop tracking algorithm, and we'll go into more detail below.
    1. Use `ExprUseVisitor` to find values that are consumed and borrowed.
    2. `DropRangeVisitor` uses consume and borrow information to gather drop and reinitialization events, as well as build a control flow graph.
    3. We then propagate drop and reinitialization information through the CFG until we reach a fix point (see `DropRanges::propagate_to_fixpoint`).
    4. When recording a type (see `InteriorVisitor::record`), we check the computed drop ranges to see if that value is definitely dropped at the suspend point. If so, we skip including it in the type.
    
    ## 1. Use `ExprUseVisitor` to find values that are consumed and borrowed.
    
    We use `ExprUseVisitor` to identify the places where values are consumed. We track both the `hir_id` of the value, and the `hir_id` of the expression that consumes it. For example, in the expression `[Foo]`, the `Foo` is consumed by the array expression, so after the array expression we can consider the `Foo` temporary to be dropped.
    
    In this process, we also collect values that are borrowed. The reason is that the MIR transform for generators conservatively assumes anything borrowed is live across a suspend point (see `rustc_mir_transform::generator::locals_live_across_suspend_points`). We match this behavior here as well.
    
    ## 2. Gather drop events, reinitialization events, and control flow graph
    
    After finding the values of interest, we perform a post-order traversal over the HIR tree to find the points where these values are dropped or reinitialized. We use the post-order index of each event because this is how the existing generator interior analysis refers to the position of suspend points and the scopes of variables.
    
    During this traversal, we also record branching and merging information to handle control flow constructs such as `if`, `match`, and `loop`. This is necessary because values may be dropped along some control flow paths but not others.
    
    ## 3. Iterate to fixed point
    
    The previous pass found the interesting events and locations, but now we need to find the actual ranges where things are dropped. Upon entry, we have a list of nodes ordered by their position in the post-order traversal. Each node has a set of successors. For each node we additionally keep a bitfield with one bit per potentially consumed value. The bit is set if we the value is dropped along all paths entering this node.
    
    To compute the drop information, we first reverse the successor edges to find each node's predecessors. Then we iterate through each node, and for each node we set its dropped value bitfield to the intersection of all incoming dropped value bitfields.
    
    If any bitfield for any node changes, we re-run the propagation loop again.
    
    ## 4. Ignore dropped values across suspend points
    
    At this point we have a data structure where we can ask whether a value is guaranteed to be dropped at any post order index for the HIR tree. We use this information in `InteriorVisitor` to check whether a value in question is dropped at a particular suspend point. If it is, we do not include that value's type in the generator type.
    
    Note that we had to augment the region scope tree to include all yields in scope, rather than just the last one as we did before.
    
    r? `@nikomatsakis`
    matthiaskrgr authored Jan 20, 2022
    Configuration menu
    Copy the full SHA
    3d10c64 View commit details
    Browse the repository at this point in the history
  24. Rollup merge of rust-lang#92856 - GuillaumeGomez:exclude-test-doc_aut…

    …o_cfg, r=Nemo157
    
    Exclude "test" from doc_auto_cfg
    
    Fixes rust-lang#91740.
    
    cc `@Nemo157` (you were the one suggesting this iirc)
    r? `@camelid`
    matthiaskrgr authored Jan 20, 2022
    Configuration menu
    Copy the full SHA
    10a7204 View commit details
    Browse the repository at this point in the history
  25. Rollup merge of rust-lang#92860 - CraftSpider:rustdoc-json-impl-ice, …

    …r=jsha
    
    Fix errors on blanket impls by ignoring the children of generated impls
    
    Related to rust-lang#83718
    
    We can safely skip the children, as they don't contain any new info, and may be subtly different for reasons hard to track down, in ways that are consistently worse than the actual generic impl.
    matthiaskrgr authored Jan 20, 2022
    Configuration menu
    Copy the full SHA
    530c884 View commit details
    Browse the repository at this point in the history
  26. Rollup merge of rust-lang#93038 - GuillaumeGomez:block-doc-comments, …

    …r=notriddle
    
    Fix star handling in block doc comments
    
    Fixes rust-lang#92872.
    
    Some extra explanation about this PR and why rust-lang#92357 created this regression: when we merge doc comment kinds for example in:
    
    ```rust
    /// he
    /**
    * hello
    */
    #[doc = "boom"]
    ```
    
    We don't want to remove the empty lines between them. However, to correctly compute the "horizontal trim", we still need it, so instead, I put back a part of the "vertical trim" directly in the "horizontal trim" computation so it doesn't impact the output buffer but allows us to correctly handle the stars.
    
    r? ``@camelid``
    matthiaskrgr authored Jan 20, 2022
    Configuration menu
    Copy the full SHA
    aa7f452 View commit details
    Browse the repository at this point in the history
  27. Rollup merge of rust-lang#93061 - estebank:macr-suggestion, r=cjgillot

    Only suggest adding `!` to expressions that can be macro invocation
    matthiaskrgr authored Jan 20, 2022
    Configuration menu
    Copy the full SHA
    dc393b2 View commit details
    Browse the repository at this point in the history
  28. Rollup merge of rust-lang#93067 - jsha:fix-scroll-padding-top, r=Guil…

    …laumeGomez
    
    rustdoc mobile: fix scroll offset when jumping to internal id
    
    Followup to rust-lang#92692. The semantics of `scroll-margin-top` are a little surprising - the attribute needs to be applied to the element that gets scrolled into the viewport, not the scrolling element.
    
    This fixes an issue where clicking on a method (or other item) from the sidebar takes you to a scroll position where the topbar covers up the method name.
    
    I'm interested in ideas for how to test this with browser-ui-test, but I think it doesn't yet have what I need. What I need is an assert that `<element>.getBoundingClientRect().y` is > 45.
    
    Demo: https://rustdoc.crud.net/jsha/fix-scroll-padding-top/std/string/struct.String.html#method.extend_from_within
    
    r? `@GuillaumeGomez`
    matthiaskrgr authored Jan 20, 2022
    Configuration menu
    Copy the full SHA
    35a53b2 View commit details
    Browse the repository at this point in the history
  29. Rollup merge of rust-lang#93086 - c410-f3r:let-guard, r=Mark-Simulacrum

    Add tests to ensure that `let_chains` works with `if_let_guard`
    
    The current machinery already makes such combination possible but lacks tests.
    
    cc `@matthewjasper`
    matthiaskrgr authored Jan 20, 2022
    Configuration menu
    Copy the full SHA
    0a9aaec View commit details
    Browse the repository at this point in the history
  30. Rollup merge of rust-lang#93087 - ricobbe:alt-calling-convention-test…

    …-fix, r=Mark-Simulacrum
    
    Fix src/test/run-make/raw-dylib-alt-calling-convention
    
    Fix the test headers so that the test now runs on all intended platforms; it is currently ignored on all platforms because the headers are incorrect.  Also comment out a couple of function calls that fail because of an unrelated problem, described in issue rust-lang#91167.
    matthiaskrgr authored Jan 20, 2022
    Configuration menu
    Copy the full SHA
    894a867 View commit details
    Browse the repository at this point in the history
  31. Rollup merge of rust-lang#93091 - pierwill:chalk-0.76, r=jackh726

    ⬆ chalk to 0.76.0
    
    This update contains rust-lang/chalk#740, which is needed for work on rust-lang#90317.
    matthiaskrgr authored Jan 20, 2022
    Configuration menu
    Copy the full SHA
    b1a405d View commit details
    Browse the repository at this point in the history
  32. Rollup merge of rust-lang#93094 - Enselic:check-for-enum-tuple-struct…

    …-fields, r=CraftSpider
    
    src/test/rustdoc-json: Check for `struct_field`s in `variant_tuple_struct.rs`
    
    The presence of `struct_field`s is being checked for already in
    `variant_struct.rs`. We should also check for them in `variant_tuple_struct.rs`.
    
    This PR is one small step towards resolving rust-lang#92945.
    matthiaskrgr authored Jan 20, 2022
    Configuration menu
    Copy the full SHA
    6cdd2e5 View commit details
    Browse the repository at this point in the history
  33. Rollup merge of rust-lang#93098 - Aaron1011:def-path-hash-debug, r=ol…

    …i-obk
    
    Show a more informative panic message when `DefPathHash` does not exist
    
    This should hopefully make it easier to debug incremental compilation
    bugs like rust-lang#93096 without affecting performance.
    matthiaskrgr authored Jan 20, 2022
    Configuration menu
    Copy the full SHA
    e901b24 View commit details
    Browse the repository at this point in the history
  34. Rollup merge of rust-lang#93099 - tomkris:rustdoc-fix, r=jsha

    rustdoc: auto create output directory when "--output-format json"
    
    This PR allows rustdoc to automatically create output directory in case it does not exist (when run with `--output-format json`).
    
    This fixes rustdoc crash:
    
    ````
    $ rustdoc --output-format json -Z unstable-options src/main.rs
    error: couldn't generate documentation: No such file or directory (os error 2)
      |
      = note: failed to create or modify "doc/main.json"
    
    error: aborting due to previous error
    ````
    
    With this fix behavior of `rustdoc --output-format json` becomes consistent with `rustdoc --output-format html` (which already auto-creates output directory if it's missing)
    matthiaskrgr authored Jan 20, 2022
    Configuration menu
    Copy the full SHA
    51fd48f View commit details
    Browse the repository at this point in the history
  35. Rollup merge of rust-lang#93102 - dtolnay:ringbuffer, r=lcnr

    Pretty printer algorithm revamp step 3
    
    This PR follows rust-lang#93065 as a third chunk of minor modernizations backported from https://github.com/dtolnay/prettyplease into rustc_ast_pretty.
    
    I've broken this up into atomic commits that hopefully are sensible in isolation. At every commit, the pretty printer is compilable and has runtime behavior that is identical to before and after the PR. None of the refactoring so far changes behavior.
    
    This PR is the last chunk of non-behavior-changing cleanup. After this the **next PR** will begin backporting behavior changes from `prettyplease`, starting with block indentation:
    
    ```rust
    macro_rules! print_expr {
        ($expr:expr) => {
            println!("{}", stringify!($expr));
        };
    }
    
    fn main() {
        print_expr!(Struct { x: 0, y: 0 });
        print_expr!(Structtttttttttttttttttttttttttttttttttttttttttttttttttt { xxxxxxxxx: 0, yyyyyyyyy: 0 });
    }
    ```
    
    Output currently on master (nowhere near modern Rust style):
    
    ```console
    Struct{x: 0, y: 0,}
    Structtttttttttttttttttttttttttttttttttttttttttttttttttt{xxxxxxxxx: 0,
                                                             yyyyyyyyy: 0,}
    ```
    
    After the upcoming PR for block indentation (based on dtolnay/prettyplease@401d60c):
    
    ```console
    Struct { x: 0, y: 0, }
    Structtttttttttttttttttttttttttttttttttttttttttttttttttt {
        xxxxxxxxx: 0,
        yyyyyyyyy: 0,
    }
    ```
    
    And the PR after that, for intelligent trailing commas (based on dtolnay/prettyplease@e2a0297):
    
    ```console
    Struct { x: 0, y: 0 }
    Structtttttttttttttttttttttttttttttttttttttttttttttttttt {
        xxxxxxxxx: 0,
        yyyyyyyyy: 0,
    }
    ```
    matthiaskrgr authored Jan 20, 2022
    Configuration menu
    Copy the full SHA
    d4ec464 View commit details
    Browse the repository at this point in the history
  36. Rollup merge of rust-lang#93104 - dtolnay:ppbless, r=Mark-Simulacrum

    Support --bless for pp-exact pretty printer tests
    
    I ran into this while working on the stack of PRs containing rust-lang#93102. `x.py test src/test/pretty --bless` previously would `fatal` instead of blessing the input files.
    
    Tested by making a silly pretty-printer tweak and running the above command: 98823c3929ebfe796786345c5ee713f63317d9c6
    matthiaskrgr authored Jan 20, 2022
    Configuration menu
    Copy the full SHA
    5e46f7d View commit details
    Browse the repository at this point in the history
  37. Rollup merge of rust-lang#93114 - lcnr:mk_array, r=RalfJung

    update comment for `ensure_monomorphic_enough`
    
    r? `@RalfJung`
    matthiaskrgr authored Jan 20, 2022
    Configuration menu
    Copy the full SHA
    b8df581 View commit details
    Browse the repository at this point in the history
  38. Rollup merge of rust-lang#93128 - pietroalbini:pa-verify-stable-versi…

    …on-number, r=Mark-Simulacrum
    
    Add script to prevent point releases with same number as existing ones
    
    This will hopefully prevent what happened today with rust-lang#93110 and rust-lang#93121, where we built point release artifacts without changing version numbers, thus requiring another PR to change the version number.
    
    r? `@Mark-Simulacrum`
    matthiaskrgr authored Jan 20, 2022
    Configuration menu
    Copy the full SHA
    9ea966a View commit details
    Browse the repository at this point in the history
  39. Rollup merge of rust-lang#93136 - pietroalbini:pa-1.58.1-relnotes-mas…

    …ter, r=pietroalbini
    
    Backport the 1.58.1 release notes to master
    
    r? `@ghost`
    matthiaskrgr authored Jan 20, 2022
    Configuration menu
    Copy the full SHA
    dd16431 View commit details
    Browse the repository at this point in the history