Skip to content

Rollup of 14 pull requests#156670

Merged
rust-bors[bot] merged 43 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-u90lYRn
May 18, 2026
Merged

Rollup of 14 pull requests#156670
rust-bors[bot] merged 43 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-u90lYRn

Conversation

@JonathanBrouwer
Copy link
Copy Markdown
Contributor

@JonathanBrouwer JonathanBrouwer commented May 17, 2026

Successful merges:

r? @ghost

Create a similar rollup

thiago-fealves and others added 30 commits May 4, 2026 10:55
…r` is found

This commit adds a diagnostic suggestion to help users who forget to
call `.collect()` when they have an iterator and the function or
variable expects a `String`.

The logic checks if the expected type is `std::string::String` and if
the found type implements the `Iterator` trait, if so the compiler
provides a suggestion to add `.collect()`

Includes also a UI test to verify if the suggestion appears correctly
Co-authored-by: Qai Juang <qaijuang@gmail.com>
For now, this is a 1-to-1 copy of `LayoutData`, but this will change.
It was always set to `Variants::Single`.
Enum variants always have `Arbitrary` layout, so the enum isn't needed.
This field is only used during layout calculations, so re-synthetized
`LayoutData`s for enum variants can use a dummy value instead.
Reusing the alignment of the enclosing enum in `LayoutData::for_variant`
doesn't appear to cause any issues.
It has a single call site.
FreeBSD 12 & 13 are now EOL. The decision to move to FreeBSD 13 was not
implemented due to the issues with the toolchain. Now that FreeBSD 14 is
the most recent supported version, we should use it for builds in CI.

Signed-off-by: Kajetan Puchalski <kajetan.puchalski@arm.com>
This works, but I couldn't find any test cases for it.
`LintExpectationId` has two variants, `Unstable` and `Stable`. There are
some places where both variants are possible, but there are also places
where only one of `Unstable` or `Stable` is possible.

This commit encodes this into the type system by introducing
new types `UnstableLintExpectationId` and `StableLintExpectationId`. The
variants of `LintExpectationId` now enclose these. This makes it clearer
what values are possible where.

Other things of note:
- `LintLevelsProvider` gets an associated type and some method changes.
- `LintContext` gets an associated type.
- `LevelSpec` is made generic. `UnstableLevelSpec` and `StableLevelSpec`
  typedefs are added.
- The unstable types are now guaranteed by the type system to never be
  stably hashed. Previously this was a runtime check.
I find these make the code harder to understand.
Describing things that took me a while to work out.
Remove redundant information in `rustc_abi::Variants`

Follow-up to rust-lang#151040; partially addresses rust-lang#113988.

Replaces the nested `LayoutData` in `Variants::Multiple` by a new, smaller `VariantLayout` struct, and adjust `LayoutData::for_variant`and the layout algorithm in consequence.
This PR is best reviewed commit-by-commit.
@rustbot rustbot added 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. labels May 17, 2026
@JonathanBrouwer
Copy link
Copy Markdown
Contributor Author

@bors r+ rollup=never p=5

Trying commonly failed jobs
@bors try jobs=dist-various-1,test-various,x86_64-gnu-aux,x86_64-gnu-llvm-21-3,x86_64-msvc-1,aarch64-apple,x86_64-mingw-1,i686-msvc-2

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 17, 2026

📌 Commit fc7ac3d 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 May 17, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request May 17, 2026
Rollup of 14 pull requests


try-job: dist-various-1
try-job: test-various
try-job: x86_64-gnu-aux
try-job: x86_64-gnu-llvm-21-3
try-job: x86_64-msvc-1
try-job: aarch64-apple
try-job: x86_64-mingw-1
try-job: i686-msvc-2
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 17, 2026

☀️ Try build successful (CI)
Build commit: d44213c (d44213c0ff8d25571887447e119383412fee1fee, parent: ba0949ab745985a442e274ba52e8fb348cb0c662)

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request May 17, 2026
…uwer

Rollup of 14 pull requests

Successful merges:

 - #151742 (Remove redundant information in `rustc_abi::Variants`)
 - #151362 (Add interior-mutability suggestion to `static_mut_refs`)
 - #156121 (compiler: suggest `.collect()` when `String` is expected and `Iterator` is found)
 - #156208 (Emit retags in codegen to support BorrowSanitizer (part 1))
 - #156596 (Split `LintExpectationId`s)
 - #156607 (ci: Update FreeBSD version to FreeBSD 14)
 - #156376 (suggest hex escapes for C-style escapes)
 - #156577 (Test EII UI tests with prefer-dynamic)
 - #156585 (explicit tail calls: ignore some tests on unsupported LLVM targets)
 - #156598 (Avoid rustfix suggestions for macro-expanded unused imports)
 - #156616 (rustdoc: add test case for `-Drustdoc::` and `--cap-lints`)
 - #156633 (Add regression test for issue #41261)
 - #156635 (rename unexpected_try_recover function)
 - #156636 (minor `rustc_mir_transform` cleanup)
@rust-log-analyzer
Copy link
Copy Markdown
Collaborator

The job x86_64-gnu-llvm-21-1 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
test expr_store::tests::body::block::inner_item_smoke ... ok
test expr_store::tests::body::array_element_cfg ... ok
test expr_store::scope::tests::while_let_adds_binding ... ok
test expr_store::tests::body::async_fn_weird_param_patterns ... ok
error: test failed, to rerun pass `-p hir-def --lib`

Caused by:
  process didn't exit successfully: `/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/hir_def-f381e8bd2208ec8b '--skip=tests::smoke_test_real_sysroot_cargo' --skip=check_code_formatting -Z unstable-options --format json` (signal: 11, SIGSEGV: invalid memory reference)
Bootstrap failed while executing `--stage 2 test --skip tests --skip coverage-map --skip coverage-run --skip library --skip tidyselftest`
Build completed unsuccessfully in 1:01:43
  local time: Sun May 17 19:07:32 UTC 2026
  network time: Sun, 17 May 2026 19:07:33 GMT
##[error]Process completed with exit code 1.

@rust-bors rust-bors Bot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels May 17, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 17, 2026

💔 Test for d97c1f0 failed: CI. Failed job:

@JonathanBrouwer
Copy link
Copy Markdown
Contributor Author

@bors retry

@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 May 17, 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 May 18, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 18, 2026

☀️ Test successful - CI
Approved by: JonathanBrouwer
Duration: 3h 8m 51s
Pushing b40ce8b to main...

@rust-bors rust-bors Bot merged commit b40ce8b into rust-lang:main May 18, 2026
13 checks passed
@rustbot rustbot added this to the 1.97.0 milestone May 18, 2026
@github-actions
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 507271b (parent) -> b40ce8b (this PR)

Test differences

Show 68 test diffs

Stage 1

  • [ui] tests/rustdoc-ui/lints/unescaped_backticks.rs: pass -> [missing] (J1)
  • [ui] tests/rustdoc-ui/lints/unescaped_backticks.rs#allow_cli: [missing] -> pass (J1)
  • [ui] tests/rustdoc-ui/lints/unescaped_backticks.rs#capped: [missing] -> pass (J1)
  • [ui] tests/rustdoc-ui/lints/unescaped_backticks.rs#deny_cli: [missing] -> pass (J1)
  • [ui] tests/ui/imports/unused-import-in-macro-expansion-rustfix.rs: [missing] -> pass (J1)
  • [ui] tests/ui/inference/ambiguous-cast-suggestion-issue-41261.rs: [missing] -> pass (J1)
  • [ui] tests/ui/lint/static-mut-refs-interior-mutability-no-sugg.rs: [missing] -> pass (J1)
  • [ui] tests/ui/lint/static-mut-refs-interior-mutability.rs: [missing] -> pass (J1)
  • [ui] tests/ui/parser/foreign-escapes.rs: [missing] -> pass (J1)
  • [ui] tests/ui/suggestions/suggest-collect.rs: [missing] -> pass (J1)

Stage 2

  • [ui] tests/ui/imports/unused-import-in-macro-expansion-rustfix.rs: [missing] -> pass (J0)
  • [ui] tests/ui/inference/ambiguous-cast-suggestion-issue-41261.rs: [missing] -> pass (J0)
  • [ui] tests/ui/lint/static-mut-refs-interior-mutability-no-sugg.rs: [missing] -> pass (J0)
  • [ui] tests/ui/lint/static-mut-refs-interior-mutability.rs: [missing] -> pass (J0)
  • [ui] tests/ui/parser/foreign-escapes.rs: [missing] -> pass (J0)
  • [ui] tests/ui/suggestions/suggest-collect.rs: [missing] -> pass (J0)
  • [ui] tests/rustdoc-ui/lints/unescaped_backticks.rs: pass -> [missing] (J2)
  • [ui] tests/rustdoc-ui/lints/unescaped_backticks.rs#allow_cli: [missing] -> pass (J2)
  • [ui] tests/rustdoc-ui/lints/unescaped_backticks.rs#capped: [missing] -> pass (J2)
  • [ui] tests/rustdoc-ui/lints/unescaped_backticks.rs#deny_cli: [missing] -> pass (J2)

Additionally, 48 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 b40ce8b786e001f105d8798ed808d2070c95168b --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. x86_64-msvc-1: 2h 7m -> 2h 47m (+30.7%)
  2. dist-powerpc64le-linux-gnu: 1h 15m -> 1h 36m (+27.2%)
  3. x86_64-msvc-ext3: 1h 56m -> 1h 25m (-26.5%)
  4. dist-x86_64-apple: 2h 20m -> 1h 46m (-24.0%)
  5. dist-loongarch64-linux: 1h 32m -> 1h 50m (+19.5%)
  6. i686-gnu-1: 2h 4m -> 1h 40m (-19.5%)
  7. dist-powerpc-linux: 1h 30m -> 1h 14m (-18.2%)
  8. dist-x86_64-mingw: 2h 39m -> 2h 14m (-16.0%)
  9. dist-apple-various: 1h 49m -> 1h 32m (-15.6%)
  10. aarch64-apple: 2h 37m -> 2h 20m (-11.0%)
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
Copy Markdown
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#151362 Add interior-mutability suggestion to static_mut_refs e27bb92a9f879bdd524a5f9493372467c1dde52b (link)
#151742 Remove redundant information in rustc_abi::Variants a20fd929044200a5fa558b3e0e5341bfcd3516c1 (link)
#156121 compiler: suggest .collect() when String is expected an… ab6ccbd2a9d14c267ddf1fcf09f0e2fd8a46bf0e (link)
#156208 Emit retags in codegen to support BorrowSanitizer (part 1) 7f0697fc480a17db91fababbb34a2ca65a47f50f (link)
#156376 suggest hex escapes for C-style escapes 79e3c747f64e44d9d4b90dcacf7875c995719912 (link)
#156577 Test EII UI tests with prefer-dynamic 79665570e4490570572896a479459b821bfe4311 (link)
#156585 explicit tail calls: ignore some tests on unsupported LLVM … 25723ebed9a890477ca45a77bb5b887e10de4591 (link)
#156596 Split LintExpectationIds ab8a9b13d61c9d672877721780d8b625c153e56f (link)
#156598 Avoid rustfix suggestions for macro-expanded unused imports ed08a0b4f01fb947591fe1cb7d939b7cb09bdbec (link)
#156607 ci: Update FreeBSD version to FreeBSD 14 a52e278cf4fe81b12f87a554b35a2302fa4a341e (link)
#156616 rustdoc: add test case for -Drustdoc:: and --cap-lints 6866e7f2f19bdb810b443691945eaf13ad63060a (link)
#156633 Add regression test for issue #41261 603f79a119d4ef31ec4ac208baeac476cf126a59 (link)
#156635 rename unexpected_try_recover function 0dfbf56f0e7f222118a73559299a1bac0fb04555 (link)
#156636 minor rustc_mir_transform cleanup 8219d184b2e49a3ea32703c0e462189d5e9182a8 (link)

previous master: 507271bc11

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
Copy Markdown
Collaborator

Finished benchmarking commit (b40ce8b): comparison URL.

Overall result: ❌ regressions - 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)
1.6% [1.6%, 1.6%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (secondary 0.6%)

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)
2.6% [2.5%, 2.7%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.5% [-2.4%, -0.6%] 2
All ❌✅ (primary) - - 0

Cycles

Results (secondary -2.9%)

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

Binary size

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

Bootstrap: 510.757s -> 511.409s (0.13%)
Artifact size: 398.50 MiB -> 400.53 MiB (0.51%)

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

Labels

A-CI Area: Our Github Actions CI A-compiletest Area: The compiletest test runner A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-rustc-dev-guide Area: rustc-dev-guide A-testsuite Area: The testsuite used to check the correctness of rustc F-explicit_tail_calls `#![feature(explicit_tail_calls)]` merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.