Skip to content

Rollup of 6 pull requests - #102787

Merged
bors merged 13 commits into
rust-lang:masterfrom
Dylan-DPC:rollup-fvbb4t9
Oct 7, 2022
Merged

Rollup of 6 pull requests#102787
bors merged 13 commits into
rust-lang:masterfrom
Dylan-DPC:rollup-fvbb4t9

Conversation

@Dylan-DPC

Copy link
Copy Markdown
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

scottmcmand others added 13 commits September 26, 2022 11:38
…ld, NeverShortCircuit::wrap_mut_2_imp)).0` everywhere
Also use that macro to replace a bunch of places that had custom closure-wrappers.
…Mark-Simulacrum
Use a macro to not have to copy-paste `ConstFnMutClosure::new(&mut fold, NeverShortCircuit::wrap_mut_2_imp)).0` everywhere
Also use that macro to replace a bunch of places that had custom closure-wrappers.
+35 -114 sounds good to me.
unsafe keyword: trait examples and unsafe_op_in_unsafe_fn update
Having a safe `fn` in an `unsafe trait` vs an `unsafe fn` in a safe `trait` are pretty different situations, but the distinction is subtle and can confuse even seasoned Rust developers. So let's have explicit examples of both. I also removed the existing `unsafe trait` example since it was rather strange.
Also the `unsafe_op_in_unsafe_fn` lint can help disentangle the two sides of `unsafe`, so update the docs to account for that.
…k-Simulacrum
Avoid repeated re-initialization of the BufReader buffer
Fixesrust-lang#102727
We accidentally removed this in rust-lang#98748. It looks so redundant. But it isn't.
The default `Read::read_buf` will defensively initialize the whole buffer, if any of it is indicated to be uninitialized. In uses where reads from the wrapped `Read` impl completely fill the `BufReader`, `initialized` and `filled` are the same, and this extra member isn't required. But in the reported issue, the `BufReader` wraps a `Read` impl which will _never_ fill the whole buffer. So the default `Read::read_buf` implementation repeatedly re-initializes the extra space in the buffer.
This adds back the extra `initialized` member, which ensures that the default `Read::read_buf` only zero-initialized the buffer once, and I've tried to add a comment which explains this whole situation.
…ckh726
Check `WhereClauseReferencesSelf` after all other object safety checks
This fixes the ICE because it causes us to detect another *non-lint* `MethodViolationCode` first, instead of breaking on `WhereClauseReferencesSelf`.
We could also approach this issue by instead returning a vector of *all* of the `MethodViolationCode`s, and just reporting the first one we see, but treating it as a hard error if we return both `WhereClauseReferencesSelf` and some other violation code -- let me know if this is desired.
Fixesrust-lang#102762
…lacrum
run Miri CI when std::sys changes
r? `@Mark-Simulacrum`
@rustbotrustbot added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure 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 Oct 7, 2022
@Dylan-DPC

Copy link
Copy Markdown
MemberAuthor

@bors r+ rollup=never p=5

@bors

bors commented Oct 7, 2022

Copy link
Copy Markdown
Collaborator

📌 Commit 3800d40 has been approved by Dylan-DPC

It is now in the queue for this repository.

@borsbors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Oct 7, 2022
@bors

bors commented Oct 7, 2022

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 3800d40 with merge 2d3a85b...

@bors

bors commented Oct 7, 2022

Copy link
Copy Markdown
Collaborator

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

@borsbors added the merged-by-bors This PR was explicitly merged by bors. label Oct 7, 2022
@bors
bors merged commit 2d3a85b into rust-lang:masterOct 7, 2022
@rustbotrustbot added this to the 1.66.0 milestone Oct 7, 2022
@rust-timer

Copy link
Copy Markdown
Collaborator

📌 Perf builds for each rolled up PR:

PR#Perf Build Sha
#10278057a4e7a29d9e6d4a0471ea4cb35fb860f36b620f
#102779aef9ca6f9a5c1750968e9481c7de19c5fe0de793
#102764134bd058a8adb305448f13a3db4b0fe604cee511
#102760c99c0dab3f925d4b5c146060218475012cf38708
#102475f36ba001758a6ff52d1280aed1f10fe4d2c34a95
#102300d09625fb7b5443b31a6f7d5ffd6a11fb2fd73db2

previous master: 43c22af267

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (2d3a85b): comparison URL.

Overall result: ❌✅ regressions and improvements - ACTION NEEDED

Next Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please open an issue or create a new PR that fixes the regressions, add a comment linking to the newly created issue or PR, and then add the perf-regression-triaged label to this PR.

@rustbot label: +perf-regression
cc @rust-lang/wg-compiler-performance

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean1rangecount2
Regressions ❌
(primary)
0.3%[0.2%, 0.3%]2
Regressions ❌
(secondary)
1.4%[1.1%, 1.9%]6
Improvements ✅
(primary)
-0.8%[-1.0%, -0.4%]8
Improvements ✅
(secondary)
-2.5%[-3.7%, -0.3%]7
All ❌✅ (primary)-0.6%[-1.0%, 0.3%]10

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.

mean1rangecount2
Regressions ❌
(primary)
1.2%[0.1%, 2.2%]2
Regressions ❌
(secondary)
2.4%[2.4%, 2.4%]1
Improvements ✅
(primary)
--0
Improvements ✅
(secondary)
-3.1%[-3.1%, -3.1%]1
All ❌✅ (primary)1.2%[0.1%, 2.2%]2

Cycles

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

Footnotes

  1. the arithmetic mean of the percent change2

  2. number of relevant changes2

@rustbotrustbot added the perf-regression Performance regression. label Oct 7, 2022
@Dylan-DPC
Dylan-DPC deleted the rollup-fvbb4t9 branch October 8, 2022 06:04
@rylev

Copy link
Copy Markdown
Member

Most of the regressions are in secondary benchmarks, so I don't think it's worth investigating what caused this.

@rustbot labels: perf-regression-triaged

@rustbotrustbot added the perf-regression-triaged The performance regression has been triaged. label Oct 11, 2022
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.perf-regressionPerformance regression.perf-regression-triagedThe performance regression has been triaged.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-infraRelevant to the infrastructure 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@rylev@rustbot@scottmcm@RalfJung@compiler-errors@saethlin@TaKO8Ki