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 7 pull requests #104138

Merged
merged 19 commits into from
Nov 8, 2022
Merged

Rollup of 7 pull requests #104138

merged 19 commits into from
Nov 8, 2022

Commits on Oct 27, 2022

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

Commits on Nov 4, 2022

  1. Update linker-plugin-lto.md to contain up to Rust 1.65

    The table rows were obtained via the script embedded in the page.
    str4d committed Nov 4, 2022
    Configuration menu
    Copy the full SHA
    ee7c58b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a0cdc85 View commit details
    Browse the repository at this point in the history

Commits on Nov 6, 2022

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

Commits on Nov 7, 2022

  1. fix debuginfo for windows_gnullvm_base.rs

    These lines (including the FIXME comment) were added to windows_gnu_base.rs in cf2c492 but windows_gnullvm_base.rs was not updated.  This resulted in an error `LLVM ERROR: dwo only supported with ELF and Wasm` attempting to build on aarch64-pc-windows-gnullvm.
    
    Signed-off-by: Jeremy Drake <github@jdrake.com>
    jeremyd2019 committed Nov 7, 2022
    Configuration menu
    Copy the full SHA
    6994651 View commit details
    Browse the repository at this point in the history
  2. Migrate linker-plugin-lto.md compatibility table to show Rust ranges

    The helper shell script has been rewritten as a helper Python script
    that generates the range-based table.
    str4d committed Nov 7, 2022
    Configuration menu
    Copy the full SHA
    ee7a802 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    80e4e72 View commit details
    Browse the repository at this point in the history
  4. add benchmark for iter::ArrayChunks::fold specialization

    This also updates the existing iter::Copied::next_chunk benchmark so
    that the thing it benches doesn't get masked by the ArrayChunks specialization
    the8472 committed Nov 7, 2022
    Configuration menu
    Copy the full SHA
    b00666e View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    eb3f001 View commit details
    Browse the repository at this point in the history
  6. specialize iter::ArrayChunks::fold for TrustedRandomAccess iters

    This is fairly safe use of TRA since it consumes the iterator so
    no struct in an unsafe state will be left exposed to user code
    the8472 committed Nov 7, 2022
    Configuration menu
    Copy the full SHA
    cfcce8e View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    43c353f View commit details
    Browse the repository at this point in the history
  8. document and improve array Guard type

    The type is unsafe and now exposed to the whole crate.
    Document it properly and add an unsafe method so the
    caller can make it visible that something unsafe is happening.
    the8472 committed Nov 7, 2022
    Configuration menu
    Copy the full SHA
    3925fc0 View commit details
    Browse the repository at this point in the history

Commits on Nov 8, 2022

  1. Rollup merge of rust-lang#103446 - the8472:tra-array-chunks, r=Mark-S…

    …imulacrum
    
    Specialize `iter::ArrayChunks::fold` for TrustedRandomAccess iterators
    
    ```
    OLD:
    test iter::bench_trusted_random_access_chunks                      ... bench:         368 ns/iter (+/- 4)
    NEW:
    test iter::bench_trusted_random_access_chunks                      ... bench:          30 ns/iter (+/- 0)
    ```
    
    The resulting assembly is similar to rust-lang#103166 but the specialization kicks in under different (partially overlapping) conditions compared to that PR. They're complementary.
    
    In principle a TRA-based specialization could be applied to all `ArrayChunks` methods, including `next()` as we do for `Zip` but that would have all the same hazards as the Zip specialization. Only doing it for `fold` is far less hazardous. The downside is that it only helps with internal, exhaustive iteration. I.e. `for _ in` or `try_fold` will not benefit.
    
    Note that the regular, `try_fold`-based and the specialized `fold()` impl have observably slightly different behavior. Namely the specialized variant does not fetch the remainder elements from the underlying iterator. We do have a few other places in the standard library where beyond-the-end-of-iteration side-effects are being elided under some circumstances but not others.
    
    Inspired by https://old.reddit.com/r/rust/comments/yaft60/zerocost_iterator_abstractionsnot_so_zerocost/
    Dylan-DPC committed Nov 8, 2022
    Configuration menu
    Copy the full SHA
    b695ed3 View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#103651 - Alexendoo:parse-format-unicode-esc…

    …apes, r=wesleywiser
    
    Fix `rustc_parse_format` spans following escaped utf-8 multibyte chars
    
    Currently too many skips are created for char escapes that are larger than 1 byte when encoded in UTF-8, [playground:](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=c77a9dc669b69b167271b59ed2c8d88c)
    
    ```rust
    fn main() {
        format!("\u{df}{a}");
        format!("\u{211d}{a}");
        format!("\u{1f4a3}{a}");
    }
    ```
    ```
    error[[E0425]](https://doc.rust-lang.org/stable/error-index.html#E0425): cannot find value `a` in this scope
     --> src/main.rs:2:22
      |
    2 |     format!("\u{df}{a}");
      |                      ^ not found in this scope
    
    error[[E0425]](https://doc.rust-lang.org/stable/error-index.html#E0425): cannot find value `a` in this scope
     --> src/main.rs:3:25
      |
    3 |     format!("\u{211d}{a}");
      |                         ^ not found in this scope
    
    error[[E0425]](https://doc.rust-lang.org/stable/error-index.html#E0425): cannot find value `a` in this scope
     --> src/main.rs:4:27
      |
    4 |     format!("\u{1f4a3}{a}");
      |                           ^ not found in this scope
    ```
    
    This reduces the number of skips to account for that
    
    Fixes rust-lang/rust-clippy#9727
    Dylan-DPC committed Nov 8, 2022
    Configuration menu
    Copy the full SHA
    4946ee7 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#103865 - compiler-errors:fallback-has-occur…

    …red-tracking, r=eholk
    
    Move `fallback_has_occurred` state tracking to `FnCtxt`
    
    Removes a ton of callsites that defaulted to `false`
    Dylan-DPC committed Nov 8, 2022
    Configuration menu
    Copy the full SHA
    77a44ab View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#103955 - str4d:update-lto-doc-1.65, r=ehuss

    Update linker-plugin-lto.md to contain up to Rust 1.65
    
    The table rows were obtained via the script embedded in the page.
    Dylan-DPC committed Nov 8, 2022
    Configuration menu
    Copy the full SHA
    799648a View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#103987 - compiler-errors:no-in_tail_expr, r…

    …=eholk
    
    Remove `in_tail_expr` from FnCtxt
    
    Cleans up yet another unneeded member from `FnCtxt`. The `in_tail_expr` condition wasn't even correct -- it was set for true while typechecking the whole fn body.
    Dylan-DPC committed Nov 8, 2022
    Configuration menu
    Copy the full SHA
    58c13e0 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#104067 - jeremyd2019:patch-1, r=davidtwco

    fix debuginfo for windows_gnullvm_base.rs
    
    These lines (including the FIXME comment) were added to windows_gnu_base.rs in cf2c492 but windows_gnullvm_base.rs was not updated.  This resulted in an error `LLVM ERROR: dwo only supported with ELF and Wasm` attempting to build on aarch64-pc-windows-gnullvm.
    
    See also msys2/MINGW-packages#13921 (comment)
    
    /cc ```@mati865``` ```@davidtwco```
    
    r? ```@davidtwco```
    Dylan-DPC committed Nov 8, 2022
    Configuration menu
    Copy the full SHA
    2b9e099 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#104094 - lcnr:on_unimplemented-move, r=wesl…

    …eywiser
    
    fully move `on_unimplemented` to `error_reporting`
    
    the `traits` module has a few too many submodules in my opinion.
    Dylan-DPC committed Nov 8, 2022
    Configuration menu
    Copy the full SHA
    c23068c View commit details
    Browse the repository at this point in the history