Skip to content

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

xizheyin and others added 27 commits March 31, 2025 15:23
for making matching on specific diagnostic kinds non-exhaustive
…mic-clones, r=nikomatsakis

Test interaction between RFC 2229 migration and use closures

r? `@nikomatsakis`

Fixes rust-lang#138101
…e-tests, r=nikomatsakis

Add more ergonomic clone tests

I've added some extra tests.

r? `@nikomatsakis`
std: improve documentation for get_mut() methods regarding forgotten guards

Fixes rust-lang#139034

This PR improves the documentation for `get_mut()` methods in `Mutex`, `RefCell`, and `RwLock` to clarify their behavior when lock guards are forgotten (e.g., via std::mem::forget).

The current documentation for these methods states that a mutable borrow "statically guarantees no locks exist", which is not entirely accurate. While a mutable borrow prevents new locks from being created, it does not clear or detect previously abandoned locks through `forget()`. This can lead to counterintuitive behavior:

https://play.rust-lang.org/?version=stable&mode=debug&edition=2024&gist=e68cefec12dcd435daf2237c16824ed3
https://play.rust-lang.org/?version=nightly&mode=debug&edition=2024&gist=81263ad652c752afd63c903113d3082c
https://play.rust-lang.org/?version=stable&mode=debug&edition=2024&gist=311baa4edb3abf82a25c8d7bf21a4a52

r? libs
…t, r=camelid

Add missing regression GUI test

Add missing GUI test for rust-lang#139282 (and also fixes the invalid CSS).

cc `@lolbinarycat`
r? `@notriddle`
compiletest: Add directive `dont-require-annotations`

for making matching on specific diagnostic kinds non-exhaustive.

E.g. `//@ dont-require-annotations:ERROR`, like in the examples in this PR.

cc rust-lang#139427 (comment)

Closes rust-lang#132647 FYI `@BoxyUwU` since you've wanted this.

r? `@jieyouxu`
…, r=lcnr

Report higher-ranked trait error when higher-ranked projection goal fails in new solver

~~See HACK comment inline. Not actually sure if it should be marked as a *HACK*, b/c~~ it's kinda a legitimate case we want to care about unless we're going to make the proof tree visitor *smarter* about the leak check than the actual trait solver itself.

Encountered this while battling with `NiceRegionError`s in the old solver b/c I wondered what this code ended up giving us in the *new* solver as a comparison:
```rust
trait Foo {}

impl<T: FnOnce(&())> Foo for T {}

fn baz<T: Foo>() {}

fn main() {
    baz::<fn(&'static ())>();
}
```

On master it's pretty bad:
```
error[E0271]: type mismatch resolving `<fn(&()) as FnOnce<(&(),)>>::Output == ()`
 --> <source>:8:11
  |
8 |     baz::<fn(&'static ())>();
  |           ^^^^^^^^^^^^^^^ types differ
  |
note: required for `fn(&'static ())` to implement `Foo`
 --> <source>:3:22
  |
3 | impl<T: FnOnce(&())> Foo for T {}
  |         -----------  ^^^     ^
  |         |
  |         unsatisfied trait bound introduced here
```

After this PR it's much better:
```
error[E0277]: the trait bound `fn(&'static ()): Foo` is not satisfied
 --> /home/mgx/test.rs:8:11
  |
8 |     baz::<fn(&'static ())>();
  |           ^^^^^^^^^^^^^^^ the trait `for<'a> FnOnce(&'a ())` is not implemented for `fn(&'static ())`
  |
  = note: expected a closure with arguments `(&'static (),)`
             found a closure with arguments `(&(),)`
note: required for `fn(&'static ())` to implement `Foo`
 --> /home/mgx/test.rs:3:22
  |
3 | impl<T: FnOnce(&())> Foo for T {}
  |         -----------  ^^^     ^
  |         |
  |         unsatisfied trait bound introduced here
note: required by a bound in `baz`
 --> /home/mgx/test.rs:5:11
  |
5 | fn baz<T: Foo>() {}
  |           ^^^ required by this bound in `baz`
```

r? lcnr
…=GuillaumeGomez,ehuss

triagebot: roll compiler reviewers for rustc/unstable book

r? compiler
Update `u8`-to-and-from-`i8` suggestions.

`u8::cast_signed` and `i8::cast_unsigned` have been stabilised, but `i8::from_ne_bytes` et al. still suggest using `as i8` or `as u8`.
report call site of inlined scopes for large assignment lints

Addressed issue: rust-lang#121672
Tracking issue: rust-lang#83518

r? `@oli-obk`

I tried to follow your comment about what to do [here](rust-lang#121672 (comment)). However, I'm totally unfamiliar with the code so far (this is my first contribution touching compiler code), so I apologize in advance if I did something stupid 😅

In particular, I'm not sure I use the _correct_ source scope to look for inline data, as there is a whole `IndexVec` of them. My changes definitely did something, as can be seen by the added ui test. However, the result is not as anticipated in the issue:
```
LL |     let cell = std::cell::UnsafeCell::new(data);
   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ value moved from here
```
instead of
```
LL |     let cell = std::cell::UnsafeCell::new(data);
   |                                           ^^^^ value moved from here
```
raising my suspicion that maybe I got the wrong source scope.
Remove redundant words

Remove redundant words
@rustbot rustbot added A-compiletest Area: The compiletest test runner A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-rustc-dev-guide Area: rustc-dev-guide labels Apr 9, 2025
@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-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. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) rollup A PR which is a rollup labels Apr 9, 2025
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented Apr 9, 2025

📌 Commit 7aab307 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 Apr 9, 2025
@bors
Copy link
Collaborator

bors commented Apr 9, 2025

⌛ Testing commit 7aab307 with merge 51548ce...

@bors
Copy link
Collaborator

bors commented Apr 10, 2025

☀️ Test successful - checks-actions
Approved by: matthiaskrgr
Pushing 51548ce to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Apr 10, 2025
@bors bors merged commit 51548ce into rust-lang:master Apr 10, 2025
1 check passed
@rustbot rustbot added this to the 1.88.0 milestone Apr 10, 2025
Copy link
Contributor

What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing 934880f (parent) -> 51548ce (this PR)

Test differences

Show 134 test diffs

Stage 1

  • [ui] tests/ui/ergonomic-clones/closure/multiple-use-variants.rs: [missing] -> pass (J0)
  • [ui] tests/ui/ergonomic-clones/closure/rfc2229-migration.rs: [missing] -> pass (J0)
  • [ui] tests/ui/ergonomic-clones/closure/spawn-thread.rs#edition2018: [missing] -> pass (J0)
  • [ui] tests/ui/ergonomic-clones/closure/spawn-thread.rs#edition2024: [missing] -> pass (J0)
  • [ui] tests/ui/ergonomic-clones/dotuse/block.rs: [missing] -> pass (J0)
  • [ui] tests/ui/lint/large_assignments/inline_mir.rs: [missing] -> pass (J0)
  • [ui] tests/ui/mismatched_types/closure-mismatch.rs: pass -> [missing] (J0)
  • [ui] tests/ui/mismatched_types/closure-mismatch.rs#current: [missing] -> pass (J0)
  • [ui] tests/ui/mismatched_types/closure-mismatch.rs#next: [missing] -> pass (J0)

Stage 2

  • [ui] tests/ui/ergonomic-clones/closure/multiple-use-variants.rs: [missing] -> pass (J1)
  • [ui] tests/ui/ergonomic-clones/closure/rfc2229-migration.rs: [missing] -> pass (J1)
  • [ui] tests/ui/ergonomic-clones/closure/spawn-thread.rs#edition2018: [missing] -> pass (J1)
  • [ui] tests/ui/ergonomic-clones/closure/spawn-thread.rs#edition2024: [missing] -> pass (J1)
  • [ui] tests/ui/ergonomic-clones/dotuse/block.rs: [missing] -> pass (J1)
  • [ui] tests/ui/lint/large_assignments/inline_mir.rs: [missing] -> pass (J1)
  • [ui] tests/ui/mismatched_types/closure-mismatch.rs: pass -> [missing] (J1)
  • [ui] tests/ui/mismatched_types/closure-mismatch.rs#current: [missing] -> pass (J1)
  • [ui] tests/ui/mismatched_types/closure-mismatch.rs#next: [missing] -> pass (J1)

Additionally, 116 doctest diffs were found. These are ignored, as they are noisy.

Job group index

Job duration changes

  1. aarch64-apple: 4687.9s -> 3696.0s (-21.2%)
  2. dist-apple-various: 7883.0s -> 9511.7s (20.7%)
  3. dist-x86_64-apple: 12286.7s -> 9764.9s (-20.5%)
  4. x86_64-apple-1: 8027.1s -> 7227.9s (-10.0%)
  5. x86_64-rust-for-linux: 2845.4s -> 2632.9s (-7.5%)
  6. dist-loongarch64-linux: 6381.0s -> 6848.1s (7.3%)
  7. dist-s390x-linux: 5543.6s -> 5184.3s (-6.5%)
  8. x86_64-msvc-ext1: 7249.0s -> 7695.6s (6.2%)
  9. dist-x86_64-linux-alt: 7057.7s -> 7446.4s (5.5%)
  10. dist-x86_64-msvc-alt: 7818.2s -> 7416.3s (-5.1%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#138470 Test interaction between RFC 2229 migration and use closures e29899976d09890a86dc0184173f7246ce670501 (link)
#138628 Add more ergonomic clone tests 4912e99c1447cce4421255d3f968d831f6f1dbae (link)
#139164 std: improve documentation for get_mut() methods regarding … 030d29906ea1b7b5ba5cfa95013b197be21bd0eb (link)
#139488 Add missing regression GUI test e16d4553d299c6c7035d53a39cda4b91df2f9490 (link)
#139489 compiletest: Add directive dont-require-annotations 9b3616ccce1bc237a6fb592ff8d64a785a487889 (link)
#139513 Report higher-ranked trait error when higher-ranked project… 345ef32eee05f5f2d298fb7e0f7844ae6c75d7f8 (link)
#139521 triagebot: roll compiler reviewers for rustc/unstable book 7dc8e0da4ef3d10d8eee30c9496dbc703bdc8854 (link)
#139532 Update u8-to-and-from-i8 suggestions. 34018d1a7911440ce54762e6a6486f231fbbe597 (link)
#139551 report call site of inlined scopes for large assignment lin… f5ba4b3876a5b7be3dea8c4ff4d9641fff9ef482 (link)
#139575 Remove redundant words 6e8008e5ef444a5ffb1923d85154f12deb88445e (link)

previous master: 934880f586

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 (51548ce): 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 (primary -1.3%)

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.3% [-1.3%, -1.3%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -1.3% [-1.3%, -1.3%] 1

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: 779.708s -> 780.069s (0.05%)
Artifact size: 366.24 MiB -> 366.22 MiB (-0.01%)

github-actions bot pushed a commit to model-checking/verify-rust-std that referenced this pull request Apr 19, 2025
…iaskrgr

Rollup of 10 pull requests

Successful merges:

 - rust-lang#138470 (Test interaction between RFC 2229 migration and use closures)
 - rust-lang#138628 (Add more ergonomic clone tests)
 - rust-lang#139164 (std: improve documentation for get_mut() methods regarding forgotten guards)
 - rust-lang#139488 (Add missing regression GUI test)
 - rust-lang#139489 (compiletest: Add directive `dont-require-annotations`)
 - rust-lang#139513 (Report higher-ranked trait error when higher-ranked projection goal fails in new solver)
 - rust-lang#139521 (triagebot: roll compiler reviewers for rustc/unstable book)
 - rust-lang#139532 (Update `u8`-to-and-from-`i8` suggestions.)
 - rust-lang#139551 (report call site of inlined scopes for large assignment lints)
 - rust-lang#139575 (Remove redundant words)

r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-compiletest Area: The compiletest test runner A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-rustc-dev-guide Area: rustc-dev-guide 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. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. 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.