Skip to content

Rollup of 7 pull requests - #104138

Merged
bors merged 19 commits into
rust-lang:masterfrom
Dylan-DPC:rollup-m3ojpjg
Nov 8, 2022
Merged

Rollup of 7 pull requests#104138
bors merged 19 commits into
rust-lang:masterfrom
Dylan-DPC:rollup-m3ojpjg

Conversation

@Dylan-DPC

Copy link
Copy Markdown
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

Alexendooand others added 19 commits October 27, 2022 18:20
The table rows were obtained via the script embedded in the page.
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>
The helper shell script has been rewritten as a helper Python script
that generates the range-based table.
This also updates the existing iter::Copied::next_chunk benchmark so
that the thing it benches doesn't get masked by the ArrayChunks specialization
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
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.
…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/
…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
Fixesrust-lang/rust-clippy#9727
…red-tracking, r=eholk
Move `fallback_has_occurred` state tracking to `FnCtxt`
Removes a ton of callsites that defaulted to `false`
Update linker-plugin-lto.md to contain up to Rust 1.65
The table rows were obtained via the script embedded in the page.
…=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.
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```
…eywiser
fully move `on_unimplemented` to `error_reporting`
the `traits` module has a few too many submodules in my opinion.
@rustbotrustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Nov 8, 2022
@Dylan-DPC

Copy link
Copy Markdown
MemberAuthor

@bors r+ rollup=never p=5

@bors

bors commented Nov 8, 2022

Copy link
Copy Markdown
Collaborator

📌 Commit c23068c has been approved by Dylan-DPC

It is now in the queue for this repository.

@borsbors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 8, 2022
@bors

bors commented Nov 8, 2022

Copy link
Copy Markdown
Collaborator

⌛ Testing commit c23068c with merge 57d3c58...

@bors

bors commented Nov 8, 2022

Copy link
Copy Markdown
Collaborator

☀️ Test successful - checks-actions
Approved by: Dylan-DPC
Pushing 57d3c58 to master...

@borsbors added the merged-by-bors This PR was explicitly merged by bors. label Nov 8, 2022
@bors
bors merged commit 57d3c58 into rust-lang:masterNov 8, 2022
@rustbotrustbot added this to the 1.67.0 milestone Nov 8, 2022
@rust-timer

Copy link
Copy Markdown
Collaborator

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (57d3c58): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

meanrangecount
Regressions ❌
(primary)
3.7%[3.7%, 3.7%]1
Regressions ❌
(secondary)
2.9%[2.9%, 2.9%]1
Improvements ✅
(primary)
--0
Improvements ✅
(secondary)
-5.3%[-6.9%, -3.7%]2
All ❌✅ (primary)3.7%[3.7%, 3.7%]1

Cycles

This benchmark run did not return any relevant results for this metric.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged-by-borsThis PR was explicitly merged by bors.rollupA PR which is a rollupS-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-libsRelevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants

@Dylan-DPC@bors@rust-timer@rustbot@Alexendoo@str4d@compiler-errors@jeremyd2019@lcnr@the8472