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 11 pull requests #100847

Merged
merged 31 commits into from
Aug 21, 2022
Merged

Rollup of 11 pull requests #100847

merged 31 commits into from
Aug 21, 2022

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

Alex-Velez and others added 30 commits August 16, 2022 19:45
Simple Clamp Function

I thought this was more robust and easier to read. I also allowed this function to return early in order to skip the extra bound check (I'm sure the difference is negligible). I'm not sure if there was a reason for binding `self` to `x`; if so, please correct me.

Simple Clamp Function for f64

I thought this was more robust and easier to read. I also allowed this function to return early in order to skip the extra bound check (I'm sure the difference is negligible). I'm not sure if there was a reason for binding `self` to `x`; if so, please correct me.

Floating point clamp test

f32 clamp using mut self

f64 clamp using mut self

Update library/core/src/num/f32.rs

Update f64.rs

Update x86_64-floating-point-clamp.rs

Update src/test/assembly/x86_64-floating-point-clamp.rs

Update x86_64-floating-point-clamp.rs

Co-Authored-By: scottmcm <scottmcm@users.noreply.github.com>
Co-authored-by: scottmcm <scottmcm@users.noreply.github.com>
LLVM commit llvm/llvm-project@c2a3888
updates the PIC level version selection. This updates the rust tests to
work under both the old and new behaviors.

Detected by our experimental rust + llvm @ HEAD bot:
https://buildkite.com/llvm-project/rust-llvm-integrate-prototype/builds/12829#0182b368-a405-47a2-b3da-9c79cb907bfe/701-709
The comment is on find_vtable_types_for_unsizing, but there is another
unrelated typo fix as well.
To avoid rust-analyzer and rustc having to wait for each other,
the dev guide mentions using another build directory for RA.

We should also put this into the .gitignore, just like the normal `build`.
The other fields use this format and example.
Module is complete because it has zero diagnostics.
Clamp Function for f32 and f64

I thought the clamp function could use a little improvement for readability purposes. The function now returns early in order to skip the extra bound checks.

If there was a reason for binding `self` to `x` or if this code is incorrect, please correct me :)
Make slice::reverse const

I remember this not being doable for some reason before, but decided to try it again and everything worked out in the tests.
…er-errors

 Minor syntax and formatting update to doc comment on `find_vtable_types_for_unsizing`

I noticed the code examples on this function weren't formatted as code, and also the that the syntax for trait objects was out of date (or just incorrect). This should bring it up to date.
update test for LLVM change

LLVM commit llvm/llvm-project@c2a3888 updates the PIC level version selection. Updated an affected rust test to work under both the old and new behaviors.

Detected by our experimental rust + llvm @ HEAD bot:
https://buildkite.com/llvm-project/rust-llvm-integrate-prototype/builds/12829#0182b368-a405-47a2-b3da-9c79cb907bfe/701-709
…r-errors

some general mir typeck cleanup

this pr contains the parts of rust-lang#95763 which already work correctly.

the remaining commits of that PR have some issues which are more complex to fix.

r? types
…otriddle

rustdoc: Merge source code pages HTML elements together v2

This is the follow-up of rust-lang#100429.

I strongly recommend to review it one commit at a time because otherwise it's a lot at once.

For these ones, on each page, I run this JS: `document.getElementsByTagName('*').length`. The goal is to count the number of DOM elements. I took some pages that seemed big, but don't hesitate to check some others. I also added the "starting point" because it's quite nice to see how much the page was reduced thanks to these two PRs.

| file name | before rust-lang#100429 | before this PR | with this PR | diff |
|-|-|-|-|-|
| std/lib.rs.html (source link on std crate page) | 3455 | 2332 | 1772 | 24% |
| alloc/vec/mod.rs.html (source on Vec type page) | 11012 | 5982 | 5833 | 2.5% |
| alloc/string.rs.html (source on String type page) | 10800 | 6010 | 5822 | 3.2% |
| std/sync/mutex.rs.html (source on Mutex type page) | 2953 | 2041 | 2038 | 0.1% |

So unsurprisingly, the more attributes you have, the bigger the difference.

You can test it [here](https://rustdoc.crud.net/imperio/reduce-span-v2/src/std/lib.rs.html).

cc ``````@jsha``````
r? ``````@notriddle``````
…gnore, r=Mark-Simulacrum

Add `/build-rust-analyzer/` to .gitignore

To avoid rust-analyzer and rustc having to wait for each other, the [dev guide](https://rustc-dev-guide.rust-lang.org/building/suggested.html#configuring-rust-analyzer-for-rustc) mentions using another build directory for RA.

We should also put this into the .gitignore, just like the normal `build`.
Make some docs nicer wrt pointer offsets

This PR replaces `pointer::offset` with `pointer::add` and similarly `.cast().wrapping_add().cast()` with `.wrapping_byte_add()` **in docs**.

r? ``````@scottmcm``````

_split off from #100746_
…rk, r=scottmcm

Replace most uses of `pointer::offset` with `add` and `sub`

As PR title says, it replaces `pointer::offset` in compiler and standard library with `pointer::add` and `pointer::sub`. This generally makes code cleaner, easier to grasp and removes (or, well, hides) integer casts.

This is generally trivially correct, `.offset(-constant)` is just `.sub(constant)`, `.offset(usized as isize)` is just `.add(usized)`, etc. However in some cases we need to be careful with signs of things.

r? ````@scottmcm````

_split off from #100746_
…_field_desc, r=thomcc

Make doc for stdin field of process consistent

The other fields use this format and example.
@rustbot rustbot added T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Aug 21, 2022
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=10

@bors
Copy link
Contributor

bors commented Aug 21, 2022

📌 Commit 5ba68df has been approved by matthiaskrgr

It is now in the queue for this repository.

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Aug 21, 2022
@bors
Copy link
Contributor

bors commented Aug 21, 2022

⌛ Testing commit 5ba68df with merge 11d4ec375309a84976ab817f5a2a9537cbb53aba...

@bors
Copy link
Contributor

bors commented Aug 21, 2022

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 21, 2022
@rust-log-analyzer
Copy link
Collaborator

A job failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)

@matthiaskrgr
Copy link
Member Author

😭
@bors retry
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (6) Could not resolve host: ci-mirrors.rust-lang.org
Error: Process completed with exit code 6.

@bors bors 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 Aug 21, 2022
@bors
Copy link
Contributor

bors commented Aug 21, 2022

⌛ Testing commit 5ba68df with merge c0941df...

@bors
Copy link
Contributor

bors commented Aug 21, 2022

☀️ Test successful - checks-actions
Approved by: matthiaskrgr
Pushing c0941df to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Aug 21, 2022
@bors bors merged commit c0941df into rust-lang:master Aug 21, 2022
@rustbot rustbot added this to the 1.65.0 milestone Aug 21, 2022
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (c0941df): comparison url.

Instruction count

  • Primary benchmarks: ✅ relevant improvement found
  • Secondary benchmarks: mixed results
mean1 max count2
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.2% 0.2% 1
Improvements ✅
(primary)
-0.5% -0.5% 1
Improvements ✅
(secondary)
-0.7% -1.1% 5
All ❌✅ (primary) -0.5% -0.5% 1

Max RSS (memory usage)

Results
  • Primary benchmarks: ❌ relevant regressions found
  • Secondary benchmarks: ❌ relevant regressions found
mean1 max count2
Regressions ❌
(primary)
2.5% 2.6% 2
Regressions ❌
(secondary)
5.4% 9.1% 3
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.5% 2.6% 2

Cycles

Results
  • Primary benchmarks: ❌ relevant regression found
  • Secondary benchmarks: ✅ relevant improvement found
mean1 max count2
Regressions ❌
(primary)
5.9% 5.9% 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.0% -3.0% 1
All ❌✅ (primary) 5.9% 5.9% 1

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

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

Footnotes

  1. the arithmetic mean of the percent change 2 3

  2. number of relevant changes 2 3

@rustbot rustbot added the perf-regression Performance regression. label Aug 21, 2022
@nnethercote
Copy link
Contributor

Not sure why this was tagged as a regression when there was just a single relevant instruction count regression of 0.20%.

@rustbot label: +perf-regression-triaged

@rustbot rustbot added the perf-regression-triaged The performance regression has been triaged. label Aug 22, 2022
@rylev
Copy link
Member

rylev commented Aug 22, 2022

@nnethercote the reason this was marked as a regression is because it was considered a mix result (both regressions and improvements). Whether a run is considered mixed vs just an improvement/regression is based on percentages. I believe this is the relevant calculation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. perf-regression Performance regression. perf-regression-triaged The performance regression has been triaged. rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.