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 7 pull requests #124527

Merged
merged 18 commits into from
Apr 29, 2024
Merged

Rollup of 7 pull requests #124527

merged 18 commits into from
Apr 29, 2024

Conversation

jieyouxu
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

GKFX and others added 18 commits April 28, 2024 14:35
The functionality of all three crates is now available in the standard library.
This was due to the must_use() call. Adding HIR's OffsetOf to the must_use
checking within the compiler avoids this issue.
as they have a potential to ICE during layout calculation
Instead of separately hard-coding the operation being visited, we can get it
from the match arm pattern by using an as-pattern.
Pretty-print parenthesis around binary in postfix match

Fixes rust-lang#124206.
Use probes more aggressively in new solver

....so that we have the right candidate information when assembling trait and normalizes-to goals.

Also gets rid of misc probes.

r? lcnr
…i-obk

Remove direct dependencies on lazy_static, once_cell and byteorder

The relevant functionality of all three crates is now available and stable in the standard library, i.e. `std::sync::OnceLock` and `{integer}::to_le_bytes`. I think waiting for `LazyLock` (rust-lang#109736) would give marginally more concise code, but not by much.
Fix rust-lang#124478 - offset_of! returns a temporary

This was due to the must_use() call. Adding HIR's `OffsetOf` to the must_use checking within the compiler avoids this issue while maintaining the lint output.

Fixes rust-lang#124478. `@tgross35`
Mark unions non-const-propagatable in `KnownPanicsLint` without calling layout

Fixes rust-lang#123710

The ICE occurs during the layout calculation of the union `InvalidTag` in rust-lang#123710 because the following assert fails:https://github.com/rust-lang/rust/blob/5fe8b697e729b6eb64841a3905e57da1b47f4ca3/compiler/rustc_abi/src/layout.rs#L289-L292

The layout calculation is invoked by `KnownPanicsLint` when it is trying to figure out which locals it can const prop. Since `KnownPanicsLint` is never actually going to const props unions thanks to PR rust-lang#121628 there's no point calling layout to check if it can. So in this fix I skip the call to layout and just mark the local non-const propagatable if it is a union.
coverage: Avoid hard-coded values when visiting logical ops

This is a tiny little thing that I noticed during the final review of rust-lang#123409, and I didn't want to hold up the whole PR just for this.

Instead of separately hard-coding the operation being visited, we can get it from the match arm pattern by using an as-pattern.

`@rustbot` label +A-code-coverage
…ouxu

[Refactor] Rename `Lint` and `LintGroup`'s `is_loaded` to `is_externally_loaded`

The field being named `is_loaded` was very confusing. Turns out it's true for lints that are registered by external tools like Clippy (I had to look at rust-lang#116412 to know what the variable meant). So I renamed `is_loaded` to `is_externally_loaded` and added some docs.
@rustbot rustbot added A-rustdoc-json Area: Rustdoc JSON backend 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-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) rollup A PR which is a rollup labels Apr 29, 2024
@jieyouxu
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Apr 29, 2024

📌 Commit ebce31a has been approved by jieyouxu

It is now in the queue for this repository.

@bors bors removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 29, 2024
@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 Apr 29, 2024
@bors
Copy link
Contributor

bors commented Apr 29, 2024

⌛ Testing commit ebce31a with merge a8a1d3a...

@bors
Copy link
Contributor

bors commented Apr 29, 2024

☀️ Test successful - checks-actions
Approved by: jieyouxu
Pushing a8a1d3a to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Apr 29, 2024
@bors bors merged commit a8a1d3a into rust-lang:master Apr 29, 2024
11 checks passed
@rustbot rustbot added this to the 1.80.0 milestone Apr 29, 2024
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#124269 Pretty-print parenthesis around binary in postfix match e25491cb5384b30c6c10e2fc2a74c5c22685829a (link)
#124415 Use probes more aggressively in new solver 551374d3a6e3c2e75d33a447db6942bef610e2df (link)
#124475 Remove direct dependencies on lazy_static, once_cell and by… 1eb7c0ab2d81074548ee617501cedccd8a170ec8 (link)
#124484 Fix #124478 - offset_of! returns a temporary 07e8ef2ec4b9e7365d1a530b39172f8348605616 (link)
#124504 Mark unions non-const-propagatable in KnownPanicsLint wit… b60aca23aaca4686a5ec49efb7ef10777732f3b0 (link)
#124508 coverage: Avoid hard-coded values when visiting logical ops ebe634d96b652dd810bbc18294d258cb73ce9b50 (link)
#124522 [Refactor] Rename Lint and LintGroup's is_loaded to `… 7ab960bc66a535146e4d7568439781d66affad40 (link)

previous master: e27af2917b

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

Overall result: no relevant changes - no action needed

@rustbot label: -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)
6.3% [6.3%, 6.3%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-1.4% [-1.4%, -1.4%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.5% [-1.4%, 6.3%] 2

Cycles

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

Binary size

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

Bootstrap: 673.188s -> 673.511s (0.05%)
Artifact size: 315.98 MiB -> 315.96 MiB (-0.01%)

@jieyouxu jieyouxu deleted the rollup-eslzncy branch April 30, 2024 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rustdoc-json Area: Rustdoc JSON backend A-testsuite Area: The testsuite used to check the correctness of rustc merged-by-bors This PR was explicitly merged by bors. 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. 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.

offset_of returns a temporary
10 participants