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 12 pull requests #121859

Merged
merged 28 commits into from
Mar 1, 2024
Merged

Rollup of 12 pull requests #121859

merged 28 commits into from
Mar 1, 2024

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

clubby789 and others added 28 commits February 6, 2024 23:12
In the previous code, the success block of `lhs` would jump directly to the
success block of `rhs`. However, `rhs_success_block` could already contain
statements that are specific to the RHS, and the direct goto causes them to be
executed in the LHS success path as well.

This patch therefore creates a fresh block that the LHS and RHS success blocks
can both jump to.
We have `use Level::*;` in this file.
Removes unused `typeid_for_fnsig` for simplifying the compiler CFI API.
By just emitting them immediately, because it does happen in practice,
when errors are downgraded to delayed bugs.

We already had one case in `lint.rs` where we handled this at the
callsite. This commit changes things so it's handled within
`stash_diagnostic` instead, because rust-lang#121812 identified a second case,
and it's possible there are more.

Fixes rust-lang#121812.
…g, r=michaelwoerister

Fix incorrect suggestion for uninitialized binding in pattern

Fixes rust-lang#120634
…nethercote

Improve error messages for generics with default parameters

Fixes rust-lang#120785

Issue: Previously, all type parameters with default types were deliberately ignored to simplify error messages. For example, an error message for Box type would display `Box<T>` instead of `Box<T, _>`. But, this resulted in unclear error message when a concrete type was used instead of the default type.

Fix: This PR fixes it by checking if a concrete type is specified after a default type to display the entire type name or the simplified type name.
…472,compiler-errors

Add tidy check for .stderr/.stdout files for non-existent test revisions

Closes rust-lang#77498.
…aelwoerister

make unused_imports less assertive in test modules

closes rust-lang#121502

This is a fairly small change and I used the fix suggested in the example expected error message.
Not sure if I should've rather used the alternatives but this one seems the most descriptive.

Some alternatives:
- if this is meant to be a test module, add `#[cfg(test)]` to the containing module
- try adding #[cfg(test)] to this test module
- consider adding #[allow(unused_imports)] if you want to silent the lint on the unused import
- consider removing the unused import
…-mutex-unlock, r=jhpratt

Remove `Mutex::unlock` Function

As of the completion of the FCP in rust-lang#81872 (comment), it has come to the conclusion to be closed.

This PR removes the function entirely in light of the above.

Closes rust-lang#81872.
Make the success arms of `if lhs || rhs` meet up in a separate block

Extracted from rust-lang#118305, where this is necessary to avoid introducing a bug when injecting marker statements into the then/else arms.

---

In the previous code (rust-lang#111752), the success block of `lhs` would jump directly to the success block of `rhs`. However, `rhs_success_block` could already contain statements that are specific to the RHS, and the direct goto causes them to be executed in the LHS success path as well.

This patch therefore creates a fresh block that the LHS and RHS success blocks can both jump to.

---

I think the reason we currently get away with this is that `rhs_success_block` usually doesn't contain anything other than StorageDead statements for locals used by the RHS, and those statements don't seem to cause problems in the LHS success path (which never makes those locals live).

But if we start adding meaningful statements for branch coverage (or MC/DC coverage), it's important to keep the LHS and RHS blocks separate.
…eid-for-fnsig, r=workingjubilee

CFI: Remove unused `typeid_for_fnsig`

Removes unused `typeid_for_fnsig` for simplifying the compiler CFI API.
Handle stashing of delayed bugs

By just emitting them immediately, because it does happen in practice, when errors are downgraded to delayed bugs.

We already had one case in `lint.rs` where we handled this at the callsite. This commit changes things so it's handled within `stash_diagnostic` instead, because rust-lang#121812 identified a second case, and it's possible there are more.

Fixes rust-lang#121812.

r? ````@oli-obk````
Remove unused fluent messages

Unused fluent messages after rust-lang#121779
Fix typo in comment

"pop" should have been "prop"
…e-trait, r=Nilstrieb

Make `ZeroablePrimitive` trait unsafe.

Tracking issue: rust-lang#120257

r? `@dtolnay`
…piler-errors

normalizes-to: handle negative impls

necessary to build the stage 2 compiler in rust-lang#121848 😁

r? `@compiler-errors`
@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. labels Mar 1, 2024
@rustbot rustbot added 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) rollup A PR which is a rollup labels Mar 1, 2024
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=12

@bors
Copy link
Contributor

bors commented Mar 1, 2024

📌 Commit ff22925 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 Mar 1, 2024
@bors
Copy link
Contributor

bors commented Mar 1, 2024

⌛ Testing commit ff22925 with merge 2dceda4...

@bors
Copy link
Contributor

bors commented Mar 1, 2024

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

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Mar 1, 2024
@bors bors merged commit 2dceda4 into rust-lang:master Mar 1, 2024
12 checks passed
@rustbot rustbot added this to the 1.78.0 milestone Mar 1, 2024
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#120646 Fix incorrect suggestion for uninitialized binding in patte… 3df2722fb94a109eaf0100abf3b1432bbb9212bc (link)
#121416 Improve error messages for generics with default parameters d5fb7b69cf28d51a44892fd2d20192013c2480ba (link)
#121475 Add tidy check for .stderr/.stdout files for non-existent t… 0e1373afd7150fdae2e7ba836cf4abf57396c30b (link)
#121580 make unused_imports less assertive in test modules d53e97c4fd6794a0e107defb7985f3788ab0d79c (link)
#121736 Remove Mutex::unlock Function afdc1331799bcc28988ae473992c658a99e74444 (link)
#121784 Make the success arms of `if lhs
#121818 CFI: Remove unused typeid_for_fnsig 5011fe80277f76be5aae01d63152e752860ae616 (link)
#121819 Handle stashing of delayed bugs 8f35535d1ab161d2ac3834b618b063624ee99deb (link)
#121828 Remove unused fluent messages 619a206fdf0ea2e615b8cb5abbbed06e19cd4191 (link)
#121831 Fix typo in comment a35a04b89dfb7193c946a03d56503e60a1b49dd7 (link)
#121850 Make ZeroablePrimitive trait unsafe. 985c7d3a4c2d68e1b5d4ab1aba8aff383a50b2b7 (link)
#121853 normalizes-to: handle negative impls c7d61bdbf4a33c0b5f915f0d87d470e437132a1a (link)

previous master: 17edacef07

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 (2dceda4): 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)
1.9% [0.5%, 3.3%] 2
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.8% [-1.1%, -0.5%] 2
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.6% [-1.1%, 3.3%] 4

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)
- - 0
Improvements ✅
(primary)
-3.6% [-11.0%, -0.2%] 8
Improvements ✅
(secondary)
-1.8% [-2.1%, -1.5%] 2
All ❌✅ (primary) -3.6% [-11.0%, -0.2%] 8

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)
2.6% [1.5%, 3.7%] 2
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.8% [-3.4%, -1.7%] 10
All ❌✅ (primary) 2.6% [1.5%, 3.7%] 2

Binary size

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.1% [0.0%, 0.1%] 9
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.1% [-0.4%, -0.0%] 13
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.0% [-0.4%, 0.1%] 22

Bootstrap: 651.533s -> 650.452s (-0.17%)
Artifact size: 311.14 MiB -> 311.17 MiB (0.01%)

@rustbot rustbot added the perf-regression Performance regression. label Mar 1, 2024
@Mark-Simulacrum
Copy link
Member

Cargo regression looks real but otherwise this looks like noise to me. I'm going to mark as triaged, I don't think it merits digging through individual PRs to try and isolate it.

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. 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-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. 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.