Skip to content

Rollup of 6 pull requests #130649

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

Merged
merged 17 commits into from
Sep 21, 2024
Merged

Rollup of 6 pull requests #130649

merged 17 commits into from
Sep 21, 2024

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

lolbinarycat and others added 17 commits August 28, 2024 21:30
Fixes stack overflow in the case of recursive types
no functional changes should arise, just moves the lint impl details out
of a very crowded file with lots of different lints in it.
A couple tests were using `BOOTSTRAP_CARGO` with `-Zbuild-std`, but that
stage0 cargo might not always be in sync with in-tree changes. In
particular, those tests started failing on the beta branch because the
older cargo couldn't find the library `Cargo.lock`, and then couldn't
build the latest version of `compiler_builtins` that had nightly changes.
no need for a weird macro when a self-explanatory `match` will do.
…ratrieb

add guarantee about remove_dir and remove_file error kinds

approved in ACP rust-lang/libs-team#433
…overflow, r=compiler-errors

Add recursion limit to FFI safety lint

Fixes rust-lang#130310

Now we check against `tcx.recursion_limit()` and raise an error if it the limit is reached instead of overflowing the stack.
Pass the current cargo to `run-make` tests

A couple tests were using `BOOTSTRAP_CARGO` with `-Zbuild-std`, but that
stage0 cargo might not always be in sync with in-tree changes. In
particular, those tests started failing on the beta branch because the
older cargo couldn't find the library `Cargo.lock`, and then couldn't
build the latest version of `compiler_builtins` that had nightly changes.

Fixes rust-lang#130634
r? `@saethlin`
… r=BoxyUwU

Only expect valtree consts in codegen

Turn a bunch of `Const::eval_*` calls into `Const::try_to_*` calls, which implicitly assert that we only have valtrees by the time we get to codegen.

r? `@BoxyUwU`
…eback, r=BoxyUwU

Normalize consts in writeback when GCE is enabled

GCE lazily normalizes its unevaluated consts. This PR ensures that, like the new solver with its lazy norm types, we can assume that the writeback results are fully normalized.

This is important since we're trying to eliminate unnecessary calls to `ty::Const::{eval,normalize}` since they won't work with mGCE. Previously, we'd keep those consts unnormalized in writeback all the way through MIR build, and they'd only get normalized if we explicitly called `ty::Const::{eval,normalize}`, or during codegen since that calls `normalize_erasing_regions` (which invokes the `QueryNormalizer`, which evaluates the const accordingly).

This hack can (hopefully obviously) be removed when mGCE is implemented and we yeet the old GCE; it's only reachable with the GCE flag anyways, so I'm not worried about the implications here.

r? `@BoxyUwU`
…-int-lint, r=compiler-errors

compiler: factor out `OVERFLOWING_LITERALS` impl

This puts it into `rustc_lint/src/types/literal.rs`. It then uses the fact that it's easier to navigate the logic to identify something that can easily be factored out, as an instance of "why".
@rustbot rustbot added A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc PG-exploit-mitigations Project group: Exploit mitigations 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-libs Relevant to the library team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Sep 21, 2024
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=6

@bors
Copy link
Collaborator

bors commented Sep 21, 2024

📌 Commit 5770ba8 has been approved by matthiaskrgr

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 Sep 21, 2024
@bors
Copy link
Collaborator

bors commented Sep 21, 2024

⌛ Testing commit 5770ba8 with merge 74fd001...

@bors
Copy link
Collaborator

bors commented Sep 21, 2024

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

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Sep 21, 2024
@bors bors merged commit 74fd001 into rust-lang:master Sep 21, 2024
7 checks passed
@rustbot rustbot added this to the 1.83.0 milestone Sep 21, 2024
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#129718 add guarantee about remove_dir and remove_file error kinds 44ece8466d5431a18c400936380d5e5affd5b7bb (link)
#130598 Add recursion limit to FFI safety lint 6e15f041aa6efc236a31046e0745562b46aca815 (link)
#130642 Pass the current cargo to run-make tests 736e7c8fdb0ff33469248f685dabc300a30ced65 (link)
#130644 Only expect valtree consts in codegen 2393b8cfdd3cd0ddb63099a0288df3913be56ba4 (link)
#130645 Normalize consts in writeback when GCE is enabled e626ecd471bc41936f8c974358d021bae357d158 (link)
#130646 compiler: factor out OVERFLOWING_LITERALS impl 9f3840a2d22808dfe65c472ec1e69add15d738e4 (link)

previous master: c0838c8ebe

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 (74fd001): comparison URL.

Overall result: ❌ regressions - 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
Regressions ❌
(secondary)
0.3% [0.1%, 0.4%] 13
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary 0.5%, secondary 0.6%)

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.8% [1.2%, 2.5%] 2
Regressions ❌
(secondary)
3.2% [3.2%, 3.2%] 1
Improvements ✅
(primary)
-2.2% [-2.2%, -2.2%] 1
Improvements ✅
(secondary)
-2.0% [-2.0%, -2.0%] 1
All ❌✅ (primary) 0.5% [-2.2%, 2.5%] 3

Cycles

Results (secondary -6.2%)

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)
- - 0
Improvements ✅
(secondary)
-6.2% [-6.7%, -5.6%] 2
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 768.11s -> 769.225s (0.15%)
Artifact size: 341.37 MiB -> 341.35 MiB (-0.00%)

@rustbot rustbot added the perf-regression Performance regression. label Sep 21, 2024
@pnkfelix
Copy link
Member

  • Weird, this is just minor regressions solely to secondary benchmarks; I had thought our policy was to not treat that on its own as worth flagging as a regression.
  • Marking as triaged.

@rustbot label: +perf-regression-triaged

@rustbot rustbot added the perf-regression-triaged The performance regression has been triaged. label Sep 24, 2024
@matthiaskrgr matthiaskrgr deleted the rollup-57zc7lz branch January 25, 2025 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-run-make Area: port run-make Makefiles to rmake.rs 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. perf-regression-triaged The performance regression has been triaged. PG-exploit-mitigations Project group: Exploit mitigations 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-libs Relevant 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.