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 4 pull requests #99054

Merged
merged 17 commits into from
Jul 8, 2022
Merged

Rollup of 4 pull requests #99054

merged 17 commits into from
Jul 8, 2022

Commits on Jun 26, 2022

  1. Add a -Zdump-drop-tracking-cfg debugging flag

    This is useful for debugging drop-tracking; previously, you had to recompile
    rustc from source and manually add a call to `write_graph_to_file`. This
    makes the option more discoverable and configurable at runtime.
    
    I also took the liberty of making the labels for the CFG nodes much easier to read:
    previously, they looked like `id(2), local_id: 48`, now they look like
    ```
    expr from_config (hir_id=HirId { owner: DefId(0:10 ~ default_struct_update[79f9]::foo), local_id: 2})
    ```
    jyn514 committed Jun 26, 2022
    Configuration menu
    Copy the full SHA
    483ee1f View commit details
    Browse the repository at this point in the history

Commits on Jun 29, 2022

  1. Change Search::infcx to tcx.

    Because the `infcx` isn't needed. This removes one lifetime from
    `Search`.
    nnethercote committed Jun 29, 2022
    Configuration menu
    Copy the full SHA
    9e76fcc View commit details
    Browse the repository at this point in the history
  2. Avoid constructing an unnecessary InferCtxt.

    Currently, `search_for_structural_match_violation` constructs an `infcx`
    from a `tcx` and then only uses the `tcx` within the `infcx`. This is
    wasteful because `infcx` is a big type.
    
    This commit changes it to use the `tcx` directly. When compiling
    `pest-2.1.3`, this changes the memcpy stats reported by DHAT for a `check full`
    build from this:
    ```
    433,008,916 bytes (100%, 99,787.93/Minstr) in 2,148,668 blocks (100%, 495.17/Minstr), avg size 201.52 bytes
    ```
    to this:
    ```
    101,422,347 bytes (99.98%, 25,243.59/Minstr) in 1,318,407 blocks (99.96%, 328.15/Minstr), avg size 76.93 bytes
    ```
    This translates to a 4.3% reduction in instruction counts.
    nnethercote committed Jun 29, 2022
    Configuration menu
    Copy the full SHA
    687e391 View commit details
    Browse the repository at this point in the history

Commits on Jul 1, 2022

  1. Make logging for drop-tracking easier to read.

    Some of these are a little questionable because the output is so much longer, but I would really love to keep the bit that adds the pretty-printed expression to the generated CFG .dot file.
    
    Before:
    ```
    DEBUG rustc_typeck::check::generator_interior::drop_ranges::record_consumed_borrow consume PlaceWithHirId { hir_id: HirId { owner: DefId(0:7 ~ default_struct_update[79f9]::foo), local_id: 15 }, place: Place { base_ty: impl std::future::Future<Output = ()>, base: Rvalue, projections: [] } }; diag_expr_id=HirId { owner: DefId(0:7 ~ default_struct_update[79f9]::foo), local_id: 15 }, using parent expr HirId { owner: DefId(0:7 ~ default_struct_update[79f9]::foo), local_id: 49 }
    ```
    
    After:
    ```
    DEBUG rustc_typeck::check::generator_interior::drop_ranges::record_consumed_borrow consume PlaceWithHirId { hir_id: HirId { owner: DefId(0:7 ~ default_struct_update[79f9]::foo), local_id: 15 }, place: Place { base_ty: impl std::future::Future<Output = ()>, base: Rvalue, projections: [] } }; diag_expr_id=expr from_config(Config {
            nickname: None,
            ..Default::default()
        }) (hir_id=HirId { owner: DefId(0:7 ~ default_struct_update[79f9]::foo), local_id: 15 }), using parent expr
        .await (hir_id=HirId { owner: DefId(0:7 ~ default_struct_update[79f9]::foo), local_id: 49 })
    ```
    jyn514 committed Jul 1, 2022
    Configuration menu
    Copy the full SHA
    3164c2a View commit details
    Browse the repository at this point in the history

Commits on Jul 8, 2022

  1. Configuration menu
    Copy the full SHA
    34d6f08 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    934079f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    1c4afbd View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    ff9fd36 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    c48f482 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    584e5d4 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    f97f2a4 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    2058333 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    0813525 View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#98533 - jyn514:drop-tracking-debugging, r=e…

    …holk
    
    Add a `-Zdump-drop-tracking-cfg` debugging flag
    
    This is useful for debugging drop-tracking; previously, you had to recompile
    rustc from source and manually add a call to `write_graph_to_file`. This
    makes the option more discoverable and configurable at runtime.
    
    I also took the liberty of making the labels for the CFG nodes much easier to read:
    previously, they looked like `id(2), local_id: 48`, now they look like
    ```
    expr from_config (hir_id=HirId { owner: DefId(0:10 ~ default_struct_update[79f9]::foo), local_id: 2})
    ```
    
    r? ``@eholk``
    Dylan-DPC authored Jul 8, 2022
    Configuration menu
    Copy the full SHA
    1ce8de3 View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#98654 - nnethercote:pest-2.1.3-opt, r=pnkfelix

    An optimization for `pest-2.1.3`
    
    An easy win I found while looking at a profile of `pest-2.1.3`. It's also a small code cleanup.
    
    r? `@pnkfelix`
    Dylan-DPC authored Jul 8, 2022
    Configuration menu
    Copy the full SHA
    fe87923 View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#98657 - compiler-errors:rustc-const-eval-se…

    …ssion-diagnostic-1, r=davidtwco
    
    Migrate some diagnostics from `rustc_const_eval` to `SessionDiagnostic`
    
    I'm still trying to get the hang of this, so it doesn't migrate _all_ of `rustc_const_eval`. Working on that later.
    
    r? `@davidtwco`
    Dylan-DPC authored Jul 8, 2022
    Configuration menu
    Copy the full SHA
    dbae830 View commit details
    Browse the repository at this point in the history
  13. Rollup merge of rust-lang#98794 - compiler-errors:conflicting-param-e…

    …nv, r=michaelwoerister
    
    Highlight conflicting param-env candidates
    
    This could probably be further improved by noting _why_ equivalent param-env candidates (modulo regions) leads to ambiguity.
    
    Fixes rust-lang#98786
    Dylan-DPC authored Jul 8, 2022
    Configuration menu
    Copy the full SHA
    54dde86 View commit details
    Browse the repository at this point in the history