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 8 pull requests #133694

Merged
merged 19 commits into from
Dec 1, 2024
Merged

Rollup of 8 pull requests #133694

merged 19 commits into from
Dec 1, 2024

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

joboet and others added 19 commits October 28, 2024 16:56
The non-trivial code for `pthread_condvar` is duplicated across the thread parking and the `Mutex`/`Condvar` implementations. This PR moves that code into `sys::pal`, which now exposes a non-movable wrapper type for `pthread_mutex_t` and `pthread_condvar_t`.
The link was introduced in 0ec321f.
For the old link see https://web.archive.org/web/20170409223244/https://monoinfinito.wordpress.com/series/exception-handling-in-c/.
The blog has migrated from WordPress to Blogger in 2021 and to GitHub pages in 2024.
This will be used in Clippy to detect useless conversions done through
`ControlFlow::map_break()` and `ControlFlow::map_continue()`.
…rkingjubilee

std: refactor `pthread`-based synchronization

The non-trivial code for `pthread_condvar` is duplicated across the thread parking and the `Mutex`/`Condvar` implementations. This PR moves that code into `sys::pal`, which now exposes an `unsafe` wrapper type for `pthread_mutex_t` and `pthread_condvar_t`.
…=cjgillot

Robustify and genericize return-type-notation resolution in `resolve_bound_vars`

rust-lang#129629 implemented return-type-notation (RTN) in its path form, like `where T::method(..): Bound`. As part of lowering, we must record the late-bound vars for the where clause introduced by the method (namely, its early- and late-bound lifetime arguments, since `where T::method(..)` turns into a higher-ranked where clause over all of the lifetimes according to [RFC 3654](https://rust-lang.github.io/rfcs/3654-return-type-notation.html#converting-to-higher-ranked-trait-bounds)).

However, this logic was only looking at the where clauses of the parent item that the `T::method(..)` bound was written on, and not any parent items. This PR generalizes that logic to look at the parent item (i.e. the outer impl or trait) instead and fixes a (debug only) assertion as an effect.

This logic is also more general and likely easier to adapt to more interesting (though likely very far off) cases like non-lifetime binder `for<T: Trait> T::method(..): Send` bounds.

Tracking:

- rust-lang#109417
fix: hurd build, stat64.st_fsid was renamed to st_dev

On hurd, `stat64.st_fsid` was renamed to `st_dev` in rust-lang/libc#3785, so if you have a new libc with this patch included, and you build std from source, you get this error:

```sh
error[E0609]: no field `st_fsid` on type `&stat64`
   --> /home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/os/hurd/fs.rs:301:36
    |
301 |         self.as_inner().as_inner().st_fsid as u64
    |                                    ^^^^^^^ unknown field
    |
help: a field with a similar name exists
    |
301 |         self.as_inner().as_inner().st_uid as u64
    |                                    ~~~~~~
```

Full CI log: https://github.com/nix-rust/nix/actions/runs/12033180710/job/33546728266?pr=2544
…codeblocks, r=cuviper

fix: fix codeblocks in `PathBuf` example

This PR adds missing codeblocks around an example included in the `PathBuf` documentation.
update link to "C++ Exceptions under the hood" blog

The link was introduced in 0ec321f. For the old link, see https://web.archive.org/web/20170409223244/https://monoinfinito.wordpress.com/series/exception-handling-in-c/. The blog has migrated from WordPress to Blogger in 2021 and to GitHub pages in 2024.
…assoc, r=lcnr

Do not create trait object type if missing associated types

r? lcnr
…=compiler-errors

Add diagnostic item for `std::ops::ControlFlow`

This will be used in Clippy to detect useless conversions done through `ControlFlow::map_break()` and `ControlFlow::map_continue()`.
Fixed typos by changing `happend` to `happened`

I just noticed this typo before and decided to fix it :3
@rustbot rustbot added O-unix Operating system: Unix-like S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. 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 Dec 1, 2024
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=8

@bors
Copy link
Contributor

bors commented Dec 1, 2024

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

bors commented Dec 1, 2024

⌛ Testing commit c0fa0ec with merge 6c76ed5...

@bors
Copy link
Contributor

bors commented Dec 1, 2024

☀️ Test successful - checks-actions
Approved by: matthiaskrgr
Pushing 6c76ed5 to master...

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

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#128184 std: refactor pthread-based synchronization cc255a319814080b00a5b38f1e352c426c2b629a (link)
#132047 Robustify and genericize return-type-notation resolution in… d2dd153c51a0d41051d3548c336c697a0f8e7703 (link)
#133515 fix: hurd build, stat64.st_fsid was renamed to st_dev 89e563f43b2f816df2368edf8fb2ac7f42a0bcf5 (link)
#133602 fix: fix codeblocks in PathBuf example 1c29670ef94f84826123b1cfd0e52395bc5dbfd4 (link)
#133622 update link to "C++ Exceptions under the hood" blog d24935edacba5cbc37de9da0d1e12182fa757a7b (link)
#133660 Do not create trait object type if missing associated types c7ca53a3757d2bf662fc72c746e247aac767fe7e (link)
#133686 Add diagnostic item for std::ops::ControlFlow a6042f48ce338781280f7ca95f3c0b1c0d054ba9 (link)
#133689 Fixed typos by changing happend to happened 679a22ace31c84728241772e57bc0b3e801ea39f (link)

previous master: 8ac313bdbe

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 (6c76ed5): 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.3% [0.1%, 0.7%] 6
Regressions ❌
(secondary)
0.5% [0.2%, 0.7%] 19
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.3% [-0.3%, -0.3%] 1
All ❌✅ (primary) 0.3% [0.1%, 0.7%] 6

Max RSS (memory usage)

Results (primary 2.4%, secondary 2.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)
2.4% [2.4%, 2.4%] 1
Regressions ❌
(secondary)
2.6% [1.1%, 7.8%] 10
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.7% [-1.7%, -1.7%] 1
All ❌✅ (primary) 2.4% [2.4%, 2.4%] 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: 769.103s -> 767.632s (-0.19%)
Artifact size: 332.14 MiB -> 332.19 MiB (0.01%)

@rustbot rustbot added the perf-regression Performance regression. label Dec 1, 2024
@rylev
Copy link
Member

rylev commented Dec 4, 2024

Most of the regressions are in doc-full scenarios, and I don't see anything that is obviously a culprit.

@rust-timer build cc255a3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. O-unix Operating system: Unix-like 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-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.