Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Rollup of 8 pull requests #133940

Merged
merged 33 commits into from
Dec 6, 2024
Merged

Rollup of 8 pull requests #133940

merged 33 commits into from
Dec 6, 2024

Conversation

GuillaumeGomez
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

WaffleLapkin and others added 30 commits November 29, 2024 04:44
this implements checks necessary to guarantee that we can actually
perform a tail call. while extremely restrictive, this is what is
documented in the RFC, and all these checks are needed for one reason or
another.
Linux v6.13-rc1 contains commit 28e848386b92 ("rust: block: fix formatting
of `kernel::block::mq::request` module"), which in turn contains commit
c95bbb59a9b2 ("rust: enable arbitrary_self_types and remove `Receiver`"),
which is why we had a hash rather than a tag.

Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
…ustdoc

Always display first line of impl blocks even when collapsed

Fixes rust-lang#130612.

It the line is too long, only the beginning will be visible:

![Screenshot from 2024-10-25 17-21-41](https://github.com/user-attachments/assets/dd2d912c-ad55-4410-8195-1d66a0a99ad4)

Otherwise, it looks like this:

![image](https://github.com/user-attachments/assets/1f40b9e0-2143-4b9d-a4b0-338a0cd740df)

Can be tested [here](https://rustdoc.crud.net/imperio/impl-block-doc/foo/struct.ImplDoc.html).

r? `@notriddle`
…r=Kobzol

CI: use free runners for i686-gnu jobs

try-job: i686-gnu-1
try-job: i686-gnu-2
try-job: i686-gnu-nopt-1
try-job: i686-gnu-nopt-2
…ompiler-errors

implement checks for tail calls

Quoting the [RFC draft](https://github.com/phi-go/rfcs/blob/guaranteed-tco/text/0000-explicit-tail-calls.md):

> The argument to become is a function (or method) call, that exactly matches the function signature and calling convention of the callee. The intent is to ensure a matching ABI. Note that lifetimes may differ as long as they pass borrow checking, see [below](https://github.com/phi-go/rfcs/blob/guaranteed-tco/text/0000-explicit-tail-calls.md#return-type-coercion) for specifics on the return type.

> Tail calling closures and tail calling from closures is not allowed. This is due to the high implementation effort, see below, this restriction can be lifted by a future RFC.

> Invocations of operators were considered as valid targets but were rejected on grounds of being too error-prone. In any case, these can still be called as methods.

> Tail calling [variadic functions](https://doc.rust-lang.org/beta/unstable-book/language-features/c-variadic.html) and tail calling from variadic functions is not allowed. As support for variadic function is stabilized on a per target level, support for tail-calls regarding variadic functions would need to follow a similar approach. To avoid this complexity and to minimize implementation effort for backends, this interaction is currently not allowed but support can be added with a future RFC.

-----

The checks are implemented as a query, similarly to `check_unsafety`.

The code is cherry-picked straight out of rust-lang#112657 which was written more than a year ago, so I expect we might need to change some things ^^"
…onur-ozkan

Replace black with ruff in `tidy`

`ruff` can both lint and format Python code (in fact, it should be a mostly drop-in replacement for `black` in terms of formatting), so it's not needed to use `black` anymore. This PR removes `black` and replaces it with `ruff`, to get rid of one Python dependency, and also to make Python formatting faster (although that's a small thing).

If we decide to merge this, we'll need to "reformat the world" - `ruff` is not perfectly compatible with `black`, and it also looks like `black` was actually ignoring some files before. I tried it locally (`./x test tidy --extra-checks=py:fmt --bless`) and it also reformatted some code in subtrees (e.g. `clippy` or `rustc_codegen_gcc`) - I'm not sure how to handle that.
CI: rfl: move job forward to Linux v6.13-rc1

Linux v6.13-rc1 contains commit 28e848386b92 ("rust: block: fix formatting of `kernel::block::mq::request` module"), which in turn contains commit c95bbb59a9b2 ("rust: enable arbitrary_self_types and remove `Receiver`"), which is why we had a hash rather than a tag.

r? ```@Kobzol``` ```@lqd```
try-job: x86_64-rust-for-linux
```@rustbot``` label A-rust-for-linux
```@bors``` try
Avoid fetching the anon const hir node that is already available
@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) 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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Dec 5, 2024
@GuillaumeGomez
Copy link
Member Author

@bors r+ p=8 rollup=never

@bors
Copy link
Contributor

bors commented Dec 5, 2024

📌 Commit 5dc05a8 has been approved by GuillaumeGomez

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 Dec 5, 2024
@bors
Copy link
Contributor

bors commented Dec 5, 2024

⌛ Testing commit 5dc05a8 with merge 706141b...

@bors
Copy link
Contributor

bors commented Dec 6, 2024

☀️ Test successful - checks-actions
Approved by: GuillaumeGomez
Pushing 706141b to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Dec 6, 2024
@bors bors merged commit 706141b into rust-lang:master Dec 6, 2024
7 checks passed
@rustbot rustbot added this to the 1.85.0 milestone Dec 6, 2024
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#132155 Always display first line of impl blocks even when collapsed 4262ce56abf0d2633b089adacd3a5f0026097b4d (link)
#133256 CI: use free runners for i686-gnu jobs f36501292b4c9b4154ec85b66b4d6be20b655804 (link)
#133607 implement checks for tail calls 08d46c5c2caf1c47f6fabd893489d30b8be99aeb (link)
#133821 Replace black with ruff in tidy 9da6333e3a0105ad2f83608595e8f24e1fdb82a7 (link)
#133827 CI: rfl: move job forward to Linux v6.13-rc1 e018b0eed09e4762677dae9d285e4eae1b543114 (link)
#133910 Normalize target-cpus.rs stdout test for LLVM changes 80848e1722e38d30686274e3454da0b14d424e17 (link)
#133921 Adapt codegen tests for NUW inference 4025491f139d850400641351bed4e5259d10bc6e (link)
#133936 Avoid fetching the anon const hir node that is already avai… a5f00e590dbbde0cfa24f3de99df7210edab9f95 (link)

previous master: c94848c046

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
Collaborator

Finished benchmarking commit (706141b): comparison URL.

Overall result: ❌✅ regressions and improvements - please read the text below

Our benchmarks found a performance regression caused by this PR.
This might be an actual regression, but it can also be just noise.

Next Steps:

  • If the regression was expected or you think it can be justified,
    please write a comment with sufficient written justification, and add
    @rustbot label: +perf-regression-triaged to it, to mark the regression as triaged.
  • If you think that you know of a way to resolve the regression, try to create
    a new PR with a fix for the regression.
  • If you do not understand the regression or you think that it is just noise,
    you can ask the @rust-lang/wg-compiler-performance working group for help (members of this group
    were already notified of this PR).

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

Instruction count

This is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.

mean range count
Regressions ❌
(primary)
0.4% [0.1%, 0.9%] 87
Regressions ❌
(secondary)
0.4% [0.1%, 1.4%] 31
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.7% [-1.9%, -1.6%] 6
All ❌✅ (primary) 0.4% [0.1%, 0.9%] 87

Max RSS (memory usage)

Results (primary -0.2%, secondary -0.5%)

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)
1.0% [0.5%, 1.7%] 3
Regressions ❌
(secondary)
2.3% [2.1%, 2.5%] 2
Improvements ✅
(primary)
-2.1% [-2.5%, -1.7%] 2
Improvements ✅
(secondary)
-3.3% [-4.3%, -2.2%] 2
All ❌✅ (primary) -0.2% [-2.5%, 1.7%] 5

Cycles

Results (primary 1.2%, secondary -2.5%)

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)
1.2% [1.2%, 1.2%] 1
Regressions ❌
(secondary)
2.1% [2.1%, 2.1%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.6% [-4.0%, -2.8%] 4
All ❌✅ (primary) 1.2% [1.2%, 1.2%] 1

Binary size

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

Bootstrap: 770.008s -> 769.915s (-0.01%)
Artifact size: 330.85 MiB -> 330.89 MiB (0.01%)

@rustbot rustbot added the perf-regression Performance regression. label Dec 6, 2024
@nnethercote
Copy link
Contributor

@rust-timer build 08d46c5

@rust-timer

This comment has been minimized.

@lqd
Copy link
Member

lqd commented Dec 6, 2024

It does sound like #133607 is going to be the one since it introduces a new query and regressions are mainly in incremental scenarios in this rollup.

@GuillaumeGomez GuillaumeGomez deleted the rollup-nm1cz5j branch December 6, 2024 09:57
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (08d46c5): comparison URL.

Overall result: ❌✅ regressions and improvements - please read the text below

Instruction count

This is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.

mean range count
Regressions ❌
(primary)
0.4% [0.1%, 0.9%] 91
Regressions ❌
(secondary)
0.4% [0.1%, 1.4%] 35
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.7% [-1.9%, -1.6%] 6
All ❌✅ (primary) 0.4% [0.1%, 0.9%] 91

Max RSS (memory usage)

Results (primary 0.5%, secondary 0.9%)

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)
1.1% [0.6%, 1.7%] 3
Regressions ❌
(secondary)
2.4% [2.3%, 2.7%] 3
Improvements ✅
(primary)
-1.5% [-1.5%, -1.5%] 1
Improvements ✅
(secondary)
-3.6% [-3.6%, -3.6%] 1
All ❌✅ (primary) 0.5% [-1.5%, 1.7%] 4

Cycles

Results (primary 1.2%, secondary -2.0%)

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)
1.2% [1.2%, 1.2%] 1
Regressions ❌
(secondary)
1.7% [1.7%, 1.7%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.3% [-3.4%, -3.1%] 3
All ❌✅ (primary) 1.2% [1.2%, 1.2%] 1

Binary size

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

Bootstrap: 770.008s -> 769.387s (-0.08%)
Artifact size: 330.85 MiB -> 330.94 MiB (0.03%)

# for free to join this conversation on GitHub. Already have an account? # 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-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) 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. 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.