Skip to content

Conversation

@jhpratt
Copy link
Member

@jhpratt jhpratt commented Jan 23, 2026

Successful merges:

r? @ghost

Create a similar rollup

joboet and others added 9 commits January 21, 2026 12:29
…anieu

std: use `clock_nanosleep` for `sleep` where available

`nanosleep` is specified to use `CLOCK_REALTIME` but the documentation (especially the example) for `sleep` imply that it measures time using `Instant`, which uses `CLOCK_MONOTONIC`. Thus, this PR makes `sleep` use a relative `clock_nanosleep` with `CLOCK_MONOTONIC` where available. This doesn't make a difference for Linux (which uses `CLOCK_MONOTONIC` for `nanosleep` anyway) but is relevant for e.g. FreeBSD.

This also restores nanosecond-sleep precision for WASI, since rust-lang#150290 was caused by `nanosleep` internally using `clock_nanosleep` with `CLOCK_REALTIME` which is unsupported on WASIp2.

CC @alexcrichton for the WASI fix
… r=jhpratt

std: ensure that the deadline has passed in `sleep_until`

The clock source used for `sleep` might not be the same as the one used for `Instant`, so the implementation of `sleep_until` may not assume that the `Instant` has elapsed. This is particularly relevant on Windows, where [`QueryPerformanceCounter`](https://learn.microsoft.com/en-us/windows/win32/api/profileapi/nf-profileapi-queryperformancecounter) is used for `Instant`, but [`SetWaitableTimer`](https://learn.microsoft.com/en-us/windows/win32/api/synchapi/nf-synchapi-setwaitabletimer) is (probably[^1]) based on [`QueryUnbiasedInterruptTimePrecise`](https://learn.microsoft.com/en-us/windows/win32/api/realtimeapiset/nf-realtimeapiset-queryunbiasedinterrupttimeprecise). If these clocks drift apart, the `sleep` might return before the deadline has passed.

Thus, this PR makes `sleep_until` recheck the current time after waking up and restart the `sleep` if necessary.

[^1]: The documentation doesn't specify a clock, but `QueryUnbiasedInterruptTimePrecise` uses the same units and doesn't count time during sleep either, so I'd wager it's what is used for the timer.
global.rs: improve readability of re-entrance section
Reorganizing tests/ui/issues 11 tests [3/N]

part of rust-lang#133895

r? Kivooeo
@rust-bors rust-bors bot added the rollup A PR which is a rollup label Jan 23, 2026
@rustbot rustbot added 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. labels Jan 23, 2026
@jhpratt
Copy link
Member Author

jhpratt commented Jan 23, 2026

@bors r+ rollup=never p=4

@rust-bors
Copy link
Contributor

rust-bors bot commented Jan 23, 2026

📌 Commit 3086257 has been approved by jhpratt

It is now in the queue for this repository.

@rust-bors rust-bors bot 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 Jan 23, 2026
@rust-bors

This comment has been minimized.

@rust-bors rust-bors bot added merged-by-bors This PR was explicitly merged by bors. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jan 23, 2026
@rust-bors
Copy link
Contributor

rust-bors bot commented Jan 23, 2026

☀️ Test successful - CI
Approved by: jhpratt
Duration: 3h 16m 6s
Pushing 1655912 to main...

@rust-bors rust-bors bot merged commit 1655912 into rust-lang:main Jan 23, 2026
12 checks passed
@rustbot rustbot added this to the 1.95.0 milestone Jan 23, 2026
@jhpratt jhpratt deleted the rollup-PFh8sRJ branch January 23, 2026 07:24
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#151450 std: use clock_nanosleep for sleep where available 2600403cfb0336cc2b3683e0d12bb4fd47a067d7 (link)
#151494 std: ensure that the deadline has passed in sleep_until 6f173877722f2ab6ee2afa839bc9bbfb1fef2523 (link)
#151498 global.rs: improve readability of re-entrance section 433828b96d4bcf1303e4f850ae4842687fd7afa2 (link)
#151504 Reorganizing tests/ui/issues 11 tests [3/N] 8d840835f736103a145812af6727820f3c0220ce (link)

previous master: d10ac47c20

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

@github-actions
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 d10ac47 (parent) -> 1655912 (this PR)

Test differences

Show 44 test diffs

Stage 1

  • [ui] tests/ui/cfg/struct-field-empty.rs: [missing] -> pass (J0)
  • [ui] tests/ui/expr/if/expr-stack-overflow.rs: [missing] -> pass (J0)
  • [ui] tests/ui/impl-trait/impl-trait-in-generic-param.rs: [missing] -> pass (J0)
  • [ui] tests/ui/issues/issue-11529.rs: pass -> [missing] (J0)
  • [ui] tests/ui/issues/issue-11681.rs: pass -> [missing] (J0)
  • [ui] tests/ui/issues/issue-16648.rs: pass -> [missing] (J0)
  • [ui] tests/ui/issues/issue-16819.rs: pass -> [missing] (J0)
  • [ui] tests/ui/issues/issue-17068.rs: pass -> [missing] (J0)
  • [ui] tests/ui/issues/issue-17877.rs: pass -> [missing] (J0)
  • [ui] tests/ui/issues/issue-18353.rs: pass -> [missing] (J0)
  • [ui] tests/ui/issues/issue-47715.rs: pass -> [missing] (J0)
  • [ui] tests/ui/issues/issue-49934-errors.rs: pass -> [missing] (J0)
  • [ui] tests/ui/issues/issue-49934.rs: pass -> [missing] (J0)
  • [ui] tests/ui/issues/issue-74564-if-expr-stack-overflow.rs: pass -> [missing] (J0)
  • [ui] tests/ui/lifetimes/for-loop-region-links.rs: [missing] -> pass (J0)
  • [ui] tests/ui/lifetimes/lifetime-inference-across-mods.rs: [missing] -> pass (J0)
  • [ui] tests/ui/lifetimes/unit-struct-as-rvalue.rs: [missing] -> pass (J0)
  • [ui] tests/ui/match/match-large-array.rs: [missing] -> pass (J0)
  • [ui] tests/ui/match/match-tuple-slice.rs: [missing] -> pass (J0)
  • [ui] tests/ui/proc-macro/derive-macro-invalid-placement.rs: [missing] -> pass (J0)
  • [ui] tests/ui/unsized/enum-struct-optimization.rs: [missing] -> pass (J0)

Stage 2

  • [ui] tests/ui/cfg/struct-field-empty.rs: [missing] -> pass (J1)
  • [ui] tests/ui/expr/if/expr-stack-overflow.rs: [missing] -> pass (J1)
  • [ui] tests/ui/impl-trait/impl-trait-in-generic-param.rs: [missing] -> pass (J1)
  • [ui] tests/ui/issues/issue-11529.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-11681.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-16648.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-16819.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-17068.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-17877.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-18353.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-47715.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-49934-errors.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-49934.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-74564-if-expr-stack-overflow.rs: pass -> [missing] (J1)
  • [ui] tests/ui/lifetimes/for-loop-region-links.rs: [missing] -> pass (J1)
  • [ui] tests/ui/lifetimes/lifetime-inference-across-mods.rs: [missing] -> pass (J1)
  • [ui] tests/ui/lifetimes/unit-struct-as-rvalue.rs: [missing] -> pass (J1)
  • [ui] tests/ui/match/match-large-array.rs: [missing] -> pass (J1)
  • [ui] tests/ui/match/match-tuple-slice.rs: [missing] -> pass (J1)
  • [ui] tests/ui/proc-macro/derive-macro-invalid-placement.rs: [missing] -> pass (J1)
  • [ui] tests/ui/unsized/enum-struct-optimization.rs: [missing] -> pass (J1)

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

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 165591238e723f2e4a1adecb0b4bacebb805bb6f --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. dist-aarch64-apple: 8829.5s -> 7087.8s (-19.7%)
  2. x86_64-gnu-nopt: 9102.8s -> 7687.9s (-15.5%)
  3. x86_64-gnu: 8160.8s -> 7162.4s (-12.2%)
  4. x86_64-gnu-llvm-21-1: 4075.9s -> 3666.7s (-10.0%)
  5. dist-x86_64-apple: 8727.6s -> 7935.3s (-9.1%)
  6. x86_64-gnu-gcc: 3475.3s -> 3786.7s (+9.0%)
  7. x86_64-msvc-ext2: 6196.7s -> 5724.3s (-7.6%)
  8. aarch64-gnu-llvm-20-2: 2943.4s -> 2735.8s (-7.1%)
  9. test-various: 6337.1s -> 5902.0s (-6.9%)
  10. x86_64-gnu-llvm-21-2: 5423.6s -> 5780.5s (+6.6%)
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

Finished benchmarking commit (1655912): 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 (secondary 5.1%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
5.1% [3.5%, 6.7%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Cycles

Results (primary 14.9%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
14.9% [14.9%, 14.9%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 14.9% [14.9%, 14.9%] 1

Binary size

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

Bootstrap: 473.42s -> 472.43s (-0.21%)
Artifact size: 383.22 MiB -> 383.24 MiB (0.01%)

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. rollup A PR which is a rollup 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.

6 participants