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 9 pull requests #107143

Merged
merged 29 commits into from
Jan 21, 2023
Merged

Rollup of 9 pull requests #107143

merged 29 commits into from
Jan 21, 2023

Conversation

compiler-errors
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

Voultapher and others added 29 commits November 20, 2022 20:35
This moves the stable sort implementation to the core::slice::sort module. By
virtue of being in core it can't access `Vec`. The two `Vec` used by merge sort,
`buf` and `runs`, are modelled as custom types that implement the very limited
required `Vec` interface with the help of provided allocation and free
functions. This is done to allow future re-use of functions and logic between
stable and unstable sort. Such as `insert_head`.
There were several unsafe blocks in the existing implementation that
were not documented with a SAFETY comment.
Since the current sidebar item is already a link, it doesn't
do anything.
paramters -> parameters
This uses less code to lay them out the same way.
…ings_with_variant_name, r=scottmcm

Change `bindings_with_variant_name` to deny-by-default

Changed the `bindings_with_variant_name` lint to deny-by-default and fixed up the affected tests.

Addresses rust-lang#103442.
…rom-self-fixup, r=TaKO8Ki

diagnostics: suggest changing `s@self::{macro}@::macro` for exported

Fixes rust-lang#99695
…homcc

Unify stable and unstable sort implementations in same core module

This moves the stable sort implementation to the core::slice::sort module. By virtue of being in core it can't access `Vec`. The two `Vec` used by merge sort, `buf` and `runs`, are modelled as custom types that implement the very limited required `Vec` interface with the help of provided allocation and free functions. This is done to allow future re-use of functions and logic between stable and unstable sort. Such as `insert_head`.

This is in preparation of rust-lang#100856 and rust-lang#104116. It only moves code, it *doesn't* change any of the sort related logic. This unlocks the ability to share `insert_head`, `insert_tail`, `swap_if_less` `merge` and more.

Tagging ````@Mark-Simulacrum```` I hope this allows progress on rust-lang#100856, by moving `merge_sort` here I hope future changes will be easier to review.
…=albertlarsan68

check for x version updates

This PR adds a check to tidy to assert that the installed version of `x` is equal to the version in `src/tools/x/Cargo.toml`. It checks the installed version of `x` by parsing the output of `cargo install --list` (as an option proposed in this [issue](rust-lang#106469)).

It does not warn if `x` has not yet been installed, on the assumption that the user isn't interested in using it.
…didates-3, r=lcnr

Implement some more new solver candidates and fix some bugs

First, fix some bugs:

1. `IndexVec::drain_enumerated(a..b)` does not give us an iterator of index keys + items enumerated from `a..b`, but from `0..(b-a)`... That caused a bug. See first commit for the fix.
2. Implement the `_: Trait` ambiguity hack. I put it in assemble, let me know if it should live elsewhere. This is important, since we otherwise consider `_: Sized` to have no solutions, and nothing passes!
3. Swap `Ambiguity` and `Unimplemented` cases for the new solver. Sorry for accidentally swapping them 😄
4. Check GATs' own predicates during projection confirmation.

Then implement a few builtin traits:

5. Implement `PointerSized`. Pretty independent.
6. Implement `Fn` family of traits for fnptr, fndef, and closures. Closures are currently broken because `FulfillCtxt::relationships` is intentionally left unimplemented. See comment in the test.

r? ```@lcnr```
…t, r=GuillaumeGomez

rustdoc: remove redundant CSS selector `.sidebar .current`

Since the current sidebar item is already a link, it doesn't do anything.
Fix typo in opaque_types.rs

paramters -> parameters
… r=albertlarsan68

fix check macro expansion

If the only argument to `check!` is the module name I get this error:

```
error: expected expression, found `,`
   --> src/tools/tidy/src/main.rs:63:42
    |
57  | /         macro_rules! check {
58  | |             ($p:ident $(, $args:expr)* ) => {
59  | |                 drain_handles(&mut handles);
60  | |
...   |
63  | |                     $p::check($($args),* , &mut flag);
    | |                                          ^ expected expression
...   |
69  | |             }
70  | |         }
    | |_________- in this expansion of `check!`
...
117 |           check!(hey);
    |           ----------- in this macro invocation
```

This change makes it so commas are added only when there are `args`.

r? ```@albertlarsan68```
…display-inline-flex, r=GuillaumeGomez

rustdoc: use CSS inline layout for radio line instead of flexbox

This uses less code to lay them out the same way. Already tested here:

https://github.com/rust-lang/rust/blob/5ce39f42bd2c8bca9c570f0560ebe1fce4eddb14/tests/rustdoc-gui/settings.goml#L123
@rustbot rustbot added the A-testsuite Area: The testsuite used to check the correctness of rustc label Jan 21, 2023
@compiler-errors
Copy link
Member Author

@bors r+ rollup=never p=9

@bors
Copy link
Contributor

bors commented Jan 21, 2023

📌 Commit 34d4df5 has been approved by compiler-errors

It is now in the queue for this repository.

@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 Jan 21, 2023
@bors
Copy link
Contributor

bors commented Jan 21, 2023

⌛ Testing commit 34d4df5 with merge e098eb1...

@bors
Copy link
Contributor

bors commented Jan 21, 2023

☀️ Test successful - checks-actions
Approved by: compiler-errors
Pushing e098eb1 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jan 21, 2023
@bors bors merged commit e098eb1 into rust-lang:master Jan 21, 2023
@rustbot rustbot added this to the 1.68.0 milestone Jan 21, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (e098eb1): 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.

mean range count
Regressions ❌
(primary)
0.3% [0.2%, 0.8%] 57
Regressions ❌
(secondary)
0.5% [0.2%, 1.4%] 28
Improvements ✅
(primary)
-0.7% [-1.1%, -0.3%] 2
Improvements ✅
(secondary)
-0.7% [-1.2%, -0.5%] 8
All ❌✅ (primary) 0.3% [-1.1%, 0.8%] 59

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.

mean range count
Regressions ❌
(primary)
3.8% [0.4%, 7.3%] 6
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-5.1% [-5.1%, -5.1%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.5% [-5.1%, 7.3%] 7

Cycles

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.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
1.7% [1.7%, 1.7%] 2
Improvements ✅
(primary)
-1.1% [-1.1%, -1.1%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -1.1% [-1.1%, -1.1%] 1

@rustbot rustbot added the perf-regression Performance regression. label Jan 21, 2023
@compiler-errors
Copy link
Member Author

@rust-timer build a45e303e98b5131aad3bc2720b3e1b2d88cab54c

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (a45e303e98b5131aad3bc2720b3e1b2d88cab54c): comparison URL.

Overall result: no relevant changes - no action needed

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf.

@bors rollup=never
@rustbot label: -S-waiting-on-perf -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.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.7% [2.7%, 2.7%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Cycles

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

@rustbot rustbot removed the perf-regression Performance regression. label Jan 21, 2023
@compiler-errors
Copy link
Member Author

@rust-timer build 54fa5d84e8020d0704306fbbf39b6f654afaf75a

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (54fa5d84e8020d0704306fbbf39b6f654afaf75a): comparison URL.

Overall result: ❌✅ regressions and improvements - ACTION NEEDED

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf.

Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please fix the regressions and do another perf run. If the next run shows neutral or positive results, the label will be automatically removed.

@bors rollup=never
@rustbot label: -S-waiting-on-perf +perf-regression

Instruction count

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

mean range count
Regressions ❌
(primary)
0.3% [0.2%, 0.7%] 58
Regressions ❌
(secondary)
0.4% [0.2%, 1.2%] 41
Improvements ✅
(primary)
-0.7% [-1.0%, -0.4%] 2
Improvements ✅
(secondary)
-1.1% [-1.1%, -1.1%] 2
All ❌✅ (primary) 0.3% [-1.0%, 0.7%] 60

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.

mean range count
Regressions ❌
(primary)
3.8% [0.4%, 7.6%] 6
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 3.8% [0.4%, 7.6%] 6

Cycles

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.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-1.1% [-1.1%, -1.1%] 1
Improvements ✅
(secondary)
-1.9% [-1.9%, -1.9%] 1
All ❌✅ (primary) -1.1% [-1.1%, -1.1%] 1

@rustbot rustbot added the perf-regression Performance regression. label Jan 21, 2023
@compiler-errors
Copy link
Member Author

compiler-errors commented Jan 21, 2023

This rollup contains a perf regression due to #104672 @Voultapher @thomcc -- can y'all investigate?

@Voultapher
Copy link
Contributor

@compiler-errors the logic stayed pretty much the same, so all I can think of is code being moved from std to core as the reason? This PR served as starting point for series of perf improvements to sort and sort_unstable. Maybe it's worth waiting to see how these improvements will affect compiler performance.

Just to clarify, the perf regression is in compiler performance?

@rylev
Copy link
Member

rylev commented Jan 25, 2023

@Voultapher yes, this is a regression in compile performance. Typically when seeing these types of regressions, it's usually that something is not being inlined that used to be. It might be worth poking at this to see if you can get some of the performance back.

@compiler-errors compiler-errors deleted the rollup-zabvmo5 branch August 11, 2023 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc merged-by-bors This PR was explicitly merged by bors. perf-regression Performance regression. 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants