Skip to content

Rollup of 7 pull requests - #165659

Merged
rust-bors[bot] merged 18 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-zEtV5xa
Nov 8, 2026
Merged

rust-bors[bot] merged 18 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-zEtV5xa

Conversation

@JonathanBrouwer

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

Talha-Dmr and others added 18 commits October 2, 2026 00:21
Slice the byte vector before converting to str, avoiding a whole-buffer
conversion while compaction may leave invalid UTF-8.
This variant is never constructed.
For `yield` this is not a problem, as nobody uses droppable types a
coroutine resume argument.

For `inline_asm`, it is delicate to gauge the effect.
Document and correct assignment order for yield and inline-asm

The first two commits cleanup and rename the variants of `InitKind`.

The third commit attempts to make several parts of MIR analyses a bit more consistent.

For calls, we correctly model assignments to happen on the return edge.

For yields, assignments also happen on the return edge according to dataflow analyses (see `TerminatorEdges`), but were considered unconditional. This should not change anything, as nobody uses droppable types as coroutine resume argument.

For  `inline_asm`, same thing, dataflow analyses consider assignments to happen on `targets` and not on unwind. This is also corrected. I have no idea what's the impact of this. I suppose user wisely avoid to assign droppable types in inline asm that may unwind.
Ensure all output is printed from lldb debugger tester

Finally tracked down this down =)

This solves 2 issues:

1. some commands, especially `script` commands, would not have their output printed by lldb batchmode. This is apparently because `SBCommandReturnObject.HasResult()` only checks if there is an output *value*, and `script` does not "return" a value. We now also check if there is anything in the output file handle (`SBCommandReturnObject.GetOutputSize()`), and if so, we print it.
2. I noticed in at least one PR, the `copy this to bless` output was cut off. We now make sure to flush all of the output handles. ~~Setting `lldb.debugger.SetAsync(False)` and explicitly flushing the stdout/stderr both individually fixed the issue from what I could tell, but doing both is preferable since we didn't want async mode on anyway.~~

r? @Kobzol, @jieyouxu
…Mark-Simulacrum

std: fix build on RTEMS after libc 0.2.191

libc 0.2.191 changed newlib's `stat` on RTEMS to use `st_atim`/`st_mtim`/`st_ctim` timespecs, so std stopped compiling for armv7-rtems-eabihf. This reads the timestamps from the timespec fields, which also gives RTEMS real nanosecond values instead of 0. I also added RTEMS to the `ReadDir::dir` fallback list: libc has no `dirfd` for it, and the other `dirfd` cfg lists in that file already skip RTEMS.

Checked with `cargo check -Zbuild-std --target armv7-rtems-eabihf`.

Fixes rust-lang#164719
… r=Mark-Simulacrum

String::retain: convert only the untouched UTF-8 tail

During compaction, `String::retain` reads the next character with `g.s.get_unchecked(read..len)`. This invokes `String`’s `Deref`, constructing a `&str` over the entire `0..len` buffer before selecting the unread tail.

For example, removing `'é'` from `"éab"` and moving `'a'` left changes the buffer from `C3 A9 61 62` to `61 A9 61 62`. The next iteration reads the valid `'b'` tail, but first converts the entire buffer, including the orphaned `A9` continuation byte, to `&str`.

Constructing a non-UTF-8 `&str` is not immediate language-level UB under the [Reference’s validity requirements](https://doc.rust-lang.org/reference/behavior-considered-undefined.html). However, this conversion violates [`from_utf8_unchecked`’s documented safety precondition](https://doc.rust-lang.org/std/str/fn.from_utf8_unchecked.html#safety). The libs discussion in rust-lang#134598 is discussing which operations accept invalid UTF-8; `str::get_unchecked` is absent from the tentative list.

The fix slices `read..len` directly from the byte vector and converts only that untouched tail to `&str`. The original string was valid UTF-8, and `read` remains on a character boundary. rust-lang#154583 uses the same approach for `extract_if`.

Related: rust-lang#150067, rust-lang#134598, rust-lang#154583.
…ibute, r=Mark-Simulacrum

Add Documentation for the `crate_type` attribute

Add documentation for the `crate_type` attribute

<!-- homu-ignore:start -->

Briefly introduces how the attribute works, possible errors and necessary details when using the attribute.

Part of rust-lang#157604
…r=mejrs

Fix unused attribute duplication for lint attributes

r? @mejrs
…hen_send, r=maxdexh

oneshot_multi_task_recv_then_send test: wait for test thread to finish

This currently sometimes fails in Miri under nextest as the background thread does not get enough time to finish before the test is done. (It's not a problem with the normal test runner as that runs all tests together in one big Miri invocation so the test does have more than enough time.)
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Nov 8, 2026
@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) A-filesystem Area: `std::fs` A-str Area: `str` and `String` 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 Nov 8, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Member Author

@bors r+ p=5 force

@rust-bors

rust-bors Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 61e6a40 has been approved by JonathanBrouwer

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 Nov 8, 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 Nov 8, 2026
@rust-bors

rust-bors Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

☀️ Test successful - CI
Approved by: JonathanBrouwer
Duration: 3h 27m 19s
Pushing 5b7b37a to main...

@rust-bors
rust-bors Bot merged commit 5b7b37a into rust-lang:main Nov 8, 2026
15 checks passed
@rustbot rustbot added this to the 1.102.0 milestone Nov 8, 2026
@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown
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 1a4d65f (parent) -> 5b7b37a (this PR)

Test differences

Show 416 test diffs

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

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 5b7b37aefcb5b2fba3c2392bc9065b9e4602d494 --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. test-x86_64-gnu-debug: 1h 16m -> 2h 16m (+77.1%)
  2. test-i686-gnu-nopt-2: 1h 26m -> 2h 25m (+68.2%)
  3. test-x86_64-gnu-gcc-core-tests: 11m 22s -> 18m 39s (+64.1%)
  4. test-pr-check-2: 25m 5s -> 41m 4s (+63.7%)
  5. test-arm-android: 1h 12m -> 1h 54m (+58.3%)
  6. test-x86_64-gnu-stable: 1h 41m -> 2h 41m (+58.0%)
  7. test-x86_64-gnu-llvm-22-3: 1h 17m -> 2h 1m (+56.8%)
  8. dist-x86_64-illumos: 1h 9m -> 1h 48m (+56.2%)
  9. dist-arm-linux-musl: 1h 17m -> 1h 56m (+50.2%)
  10. dist-x86_64-apple: 1h 37m -> 2h 23m (+46.9%)
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-bors

rust-bors Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#160777 Document and correct assignment order for yield and inline-… 5c8717da2ce5c76fc20ebe601c7cadc9f1e9a2f1
(link)
#165224 Ensure all output is printed from lldb debugger tester 7b3283aba0a1af064439f848360d30755d84a81f
(link)
#165629 std: fix build on RTEMS after libc 0.2.191 a6f1350ad8f12b1d4f8a15cdc07b8f49f52ee4bf
(link)
#163624 String::retain: convert only the untouched UTF-8 tail ae64396d1d58ea5816b08879dcf1b4c01f88ef1c
(link)
#164519 Add Documentation for the crate_type attribute fdc3d69c63819c3db3eb74f35852e17e7adf76bf
(link)
#165249 Fix unused attribute duplication for lint attributes a7c76571c1609b2fe40922bc5357d65973755c01
(link)
#165643 oneshot_multi_task_recv_then_send test: wait for test threa… 4feb0405d46d2c775cb36e86eabec7a80914b10e
(link)

parent commit: 1a4d65fa9d

In the case of a perf regression, run the following command with the SHAs of each PR you suspect might be the cause: @rust-timer triage $SHA $SHA $SHA..., or run @rust-timer triage all to benchmark all rollup members.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (5b7b37a): comparison URL.

Overall result: ❌✅ regressions and improvements - no action needed

@rustbot label: -perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

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

Max RSS (memory usage)

Results (primary -1.9%, secondary 0.2%)

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)
1.3% [1.2%, 1.4%] 2
Improvements ✅
(primary)
-1.9% [-2.2%, -1.7%] 2
Improvements ✅
(secondary)
-2.0% [-2.0%, -2.0%] 1
All ❌✅ (primary) -1.9% [-2.2%, -1.7%] 2

Cycles

Results (primary 2.6%)

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

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

Binary size

This perf run didn't have relevant results for this metric.

Bootstrap: 483.59s -> 485.729s (0.44%)
Artifact size: 406.18 MiB -> 406.24 MiB (0.02%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) A-filesystem Area: `std::fs` A-str Area: `str` and `String` 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.

9 participants