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

Merged
merged 27 commits into from
Jan 20, 2024
Merged

Rollup of 10 pull requests #120157

merged 27 commits into from
Jan 20, 2024

Commits on Jun 28, 2023

  1. optimize Cstr/EscapeAscii display

    old:
        ascii::bench_ascii_escape_display_mixed      17.97µs/iter +/- 204.00ns
        ascii::bench_ascii_escape_display_no_escape 545.00ns/iter   +/- 6.00ns
    new:
        ascii::bench_ascii_escape_display_mixed      4.99µs/iter +/- 56.00ns
        ascii::bench_ascii_escape_display_no_escape 91.00ns/iter  +/- 1.00ns
    the8472 committed Jun 28, 2023
    Configuration menu
    Copy the full SHA
    6c87448 View commit details
    Browse the repository at this point in the history

Commits on Jan 19, 2024

  1. Add trait obligation tracking to FulfillCtxt and expose FnCtxt in rus…

    …tc_infer using callback.
    
    Pass each obligation to an fn callback with its respective inference context. This avoids needing to keep around copies of obligations or inference contexts.
    
    Specify usability of inspect_typeck in comment.
    gavinleroy committed Jan 19, 2024
    Configuration menu
    Copy the full SHA
    130b7e7 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    50b4ca6 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    225f0b9 View commit details
    Browse the repository at this point in the history
  4. Stabilize simple offset_of

    GKFX committed Jan 19, 2024
    Configuration menu
    Copy the full SHA
    615946d View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    803b810 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    7924c9b View commit details
    Browse the repository at this point in the history
  7. add test issue-117965

    trevyn committed Jan 19, 2024
    Configuration menu
    Copy the full SHA
    0943a6b View commit details
    Browse the repository at this point in the history
  8. Added NonZeroXxx::from_mut(_unchecked)?

    SOF3 authored and dtolnay committed Jan 19, 2024
    Configuration menu
    Copy the full SHA
    4459be7 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    3acb445 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    596410e View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    de2575f View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    b72af9f View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    b1688b4 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    6b7e6ea View commit details
    Browse the repository at this point in the history
  15. Update tests after rebase

    estebank committed Jan 19, 2024
    Configuration menu
    Copy the full SHA
    7edbc95 View commit details
    Browse the repository at this point in the history

Commits on Jan 20, 2024

  1. Configuration menu
    Copy the full SHA
    078a979 View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#103730 - SOF3:nonzero-from-mut, r=Mark-Simu…

    …lacrum,dtolnay
    
    Added NonZeroXxx::from_mut(_unchecked)?
    
    ACP: rust-lang/libs-team#129
    Tracking issue: rust-lang#106290
    matthiaskrgr authored Jan 20, 2024
    Configuration menu
    Copy the full SHA
    f1713b0 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#113142 - the8472:opt-cstr-display, r=Mark-S…

    …imulacrum
    
    optimize EscapeAscii's Display  and CStr's Debug
    
    ```
    old:
        ascii::bench_ascii_escape_display_mixed      17.97µs/iter +/- 204.00ns
        ascii::bench_ascii_escape_display_no_escape 545.00ns/iter   +/- 6.00ns
    new:
        ascii::bench_ascii_escape_display_mixed      4.99µs/iter +/- 56.00ns
        ascii::bench_ascii_escape_display_no_escape 91.00ns/iter  +/- 1.00ns
    ```
    matthiaskrgr authored Jan 20, 2024
    Configuration menu
    Copy the full SHA
    17c95b6 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#118799 - GKFX:stabilize-simple-offsetof, r=…

    …wesleywiser
    
    Stabilize single-field offset_of
    
    This PR stabilizes offset_of for a single field. There has been some further discussion at rust-lang#106655 about whether this is advisable; I'm opening the PR anyway so that the code is available.
    matthiaskrgr authored Jan 20, 2024
    Configuration menu
    Copy the full SHA
    6f67208 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#119613 - gavinleroy:expose-obligations, r=lcnr

    Expose Obligations created during type inference.
    
    This PR is a first pass at exposing the trait obligations generated and solved for during the type-check progress. Exposing these obligations allows for rustc plugins to use the public interface for proof trees (provided by the next gen trait solver).
    
    The changes proposed track *all* obligations during the type-check process, this is desirable to not only look at the trees of failed obligations, but also those of successfully proved obligations. This feature is placed behind an unstable compiler option `track-trait-obligations` which should be used together with the `next-solver` option. I should note that the main interface is the function `inspect_typeck` made public in `rustc_hir_typeck/src/lib.rs` which allows the caller to provide a callback granting access to the `FnCtxt`.
    
    r? `@lcnr`
    matthiaskrgr authored Jan 20, 2024
    Configuration menu
    Copy the full SHA
    2de5ca2 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#119752 - estebank:ice-ice, r=fmease

    Avoid ICEs in trait names without `dyn`
    
    Check diagnostic is error before downgrading. Fix rust-lang#119633.
    
     Account for traits using self-trait by name without `dyn`. Fix rust-lang#119652.
    matthiaskrgr authored Jan 20, 2024
    Configuration menu
    Copy the full SHA
    177d513 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#120132 - oli-obk:helpful_tidy, r=Mark-Simul…

    …acrum
    
    Teach tidy about line/col information for malformed features
    
    This makes it significantly easier to find the specific feature, since you can now just click it in the command line of your IDE
    matthiaskrgr authored Jan 20, 2024
    Configuration menu
    Copy the full SHA
    836bc69 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#120135 - oli-obk:smir_private, r=celinval

    SMIR: Make the remaining "private" fields actually private
    
    Turns out we have already created a trait that allows us to make the fields private: https://doc.rust-lang.org/nightly/nightly-rustc/stable_mir/ty/trait.IndexedVal.html
    
    fixes rust-lang/project-stable-mir#56
    
    r? `@celinval`
    matthiaskrgr authored Jan 20, 2024
    Configuration menu
    Copy the full SHA
    409949b View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#120148 - trevyn:issue-117965, r=cjgillot

    `single_use_lifetimes`: Don't suggest deleting lifetimes with bounds
    
    Closes rust-lang#117965
    
    ```
    9 |     pub fn get<'b: 'a>(&'b self) -> &'a str {
      |                ^^       -- ...is used only here
      |                |
      |                this lifetime...
    ```
    
    In this example, I think the `&'b self` can be replaced with the bound itself, yielding `&'a self`, but this would require a deeper refactor. Happy to do as a follow-on PR if desired.
    matthiaskrgr authored Jan 20, 2024
    Configuration menu
    Copy the full SHA
    b7c2ba7 View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#120150 - Jules-Bertholet:stabilize-round-ti…

    …es-even, r=cuviper
    
    Stabilize `round_ties_even`
    
    Closes  rust-lang#96710
    
    `@rustbot` label -T-libs T-libs-api
    matthiaskrgr authored Jan 20, 2024
    Configuration menu
    Copy the full SHA
    862d3fe View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#120155 - compiler-errors:no-erased-when-pro…

    …moting, r=aliemjay
    
    Don't use `ReErased` to detect type test promotion failed
    
    Using `ReErased` here is convenient because it implicitly stores the state that we are explicitly recording with the `failed` variable now, but I also think it adds a tiny bit of complexity that is not worth it.
    
    r? `@aliemjay`
    matthiaskrgr authored Jan 20, 2024
    Configuration menu
    Copy the full SHA
    bb816e6 View commit details
    Browse the repository at this point in the history