Skip to content

Rollup of 11 pull requests#159213

Merged
rust-bors[bot] merged 122 commits into
rust-lang:mainfrom
jhpratt:rollup-w7hkEWH
Jul 13, 2026
Merged

Rollup of 11 pull requests#159213
rust-bors[bot] merged 122 commits into
rust-lang:mainfrom
jhpratt:rollup-w7hkEWH

Conversation

@jhpratt

@jhpratt jhpratt commented Jul 13, 2026

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

MavenRain and others added 30 commits June 6, 2026 22:19
ExprValidator::check_unused_must_use previously matched only Expr::Call and Expr::MethodCall directly on the expression of a Statement::Expr with semicolon. This left several stmt-with-semi cases unwarned: blocks whose tail is a #[must_use] call, unsafe-blocks, if/else arms, match arms, and const blocks.

Refactors check_unused_must_use to walk into Expr::Block { tail }, Expr::Unsafe { tail }, Expr::If { then_branch, else_branch }, Expr::Match { arms }, and Expr::Const(inner) before applying the existing leaf check (callee or method #[must_use] attribute, or #[must_use] ADT return type). The diagnostic stays at the leaf call so the span points to the actual must_use producer rather than the wrapping block.

Adds ide-diagnostics tests covering each new container case.

Follow-up to rust-lang/rust-analyzer#22239.

Signed-off-by: Onyeka Obi <softwareengineerasaservant@isurvivable.cv>
The `resolver.lockfile_path` setting was stabilized, so we can omit the `-Zlockfile-path` argument.
- clean-up `MacroArgResult` docs
- remove needless import
- move `impl_internable!(ModPath)` to `mod_path.rs`
- combine the impl blocks of HirFileId
  AFAICT there's no semantic separation between them, and the first impl
  block is placed before the definition itself.
Signed-off-by: Xiangfei Ding <dingxiangfei2009@protonmail.ch>
Add a simple info log statement when cache priming finishes on startup.

Disclosure: Anthropic Claude 3.5 Flash assisted with this change.
Storage is still required even if the local is moved out and
immediately moved in again.

Signed-off-by: Xiangfei Ding <dingxiangfei2009@protonmail.ch>
NavigationTarget::docs isn't actually used anywhere, so remove it.

After 05c0f88c77233154ca592d59c90ec7da81ad63da I thought I'd take a
look at any other obviously unused fields and found this. This change
has negligible performance impact in my testing, but it's less code.

AI disclosure: Written with help by Claude and Fable 5.
…e-to-ready

provide startup time to ready log point and associated benchmark
…_id-and-hir_file_id-methods

internal: remove some more `ExpandDatabase` queries
- move span map creation out of the closure, as it's an expensive operation
internal: migrate `ExpandDatabase::*span_map` queries
We should strip `///` (or `//!` or `/**` or `/*!`), which is 3 characters, not 2.
 - Increase the recursion depth when handling the expansion and not when expanding, so that we actually respect the recursion limit.
 - Reuse the already-available span map on expansion.
 - Have only one context struct.
Example
---
```diff
-typeT = $0 whereSelf:Sized;
+type T = $0 where Self: Sized;
```
- Use `HirFileId::parse_with_map`. This avoids a duplicate call to
  `MacroCallId::parse_macro_expansion` in the macro case.
For symmetry with `MacroCallId::macro_expand`
internal: make `expand_speculative` a method on `MacroCallId`
@rustbot rustbot added T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rust-analyzer Relevant to the rust-analyzer team, which will review and decide on the PR/issue. labels Jul 13, 2026
@jhpratt

jhpratt commented Jul 13, 2026

Copy link
Copy Markdown
Member Author

@bors r+ rollup=never p=5

@rust-bors

rust-bors Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

📌 Commit fc4cd8e 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 Jul 13, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jul 13, 2026
Rollup of 11 pull requests

Successful merges:

 - #159210 (`rust-analyzer` subtree update)
 - #158655 (Fix coroutine MIR saved local remapping)
 - #159205 (bootstrap: Replace `ShouldRun::crates` with `crate_or_deps_filtered`)
 - #159208 (Fix `attr_on_non_tail_expr` typo)
 - #157524 (Fix relative paths in private import suggestions)
 - #158325 (Document NonNull layout guarantees)
 - #158882 (enable `do_not_recommend` attr for method call errors in current solver)
 - #158982 (Pretty-print MIR user types too.)
 - #159069 (Add codegen test for constant returns after local use)
 - #159163 (rustc_target: Add acquire-release to implied features of v8)
 - #159201 (borrowck: Represent 'best blame constraint' as index into `Vec<OutlivesConstraint>`)
@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 Jul 13, 2026
@rust-bors

rust-bors Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

💔 Test for 5a52488 failed: CI. Failed job:

@JonathanBrouwer

Copy link
Copy Markdown
Contributor

@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 Jul 13, 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 Jul 13, 2026
@rust-bors

rust-bors Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

☀️ Test successful - CI
Approved by: jhpratt
Duration: 3h 17m 32s
Pushing 225e91c to main...

@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 5503df8 (parent) -> 225e91c (this PR)

Test differences

Show 223 test diffs

Stage 0

  • ast::make::tests::expr_if_without_else_has_no_trailing_whitespace: [missing] -> pass (J1)
  • handlers::add_missing_impl_members::tests::issue_10326: [missing] -> pass (J1)
  • handlers::generate_function::tests::add_function_not_applicable_in_unresolved_module: [missing] -> pass (J1)
  • handlers::merge_imports::tests::test_merge_with_trailing_path_separator: [missing] -> pass (J1)
  • handlers::type_mismatch::tests::array_length: [missing] -> pass (J1)
  • handlers::unused_must_use::tests::block_tail_expression_in_stmt_position: [missing] -> pass (J1)
  • handlers::unused_must_use::tests::const_block_in_stmt_position: [missing] -> pass (J1)
  • handlers::unused_must_use::tests::if_branches_in_stmt_position: [missing] -> pass (J1)
  • handlers::unused_must_use::tests::match_arms_in_stmt_position: [missing] -> pass (J1)
  • handlers::unused_must_use::tests::must_use_type_through_block: [missing] -> pass (J1)
  • handlers::unused_must_use::tests::nested_block_tail_expression: [missing] -> pass (J1)
  • handlers::unused_must_use::tests::no_warning_when_block_tail_is_bound: [missing] -> pass (J1)
  • handlers::unused_must_use::tests::unsafe_block_tail_expression_in_stmt_position: [missing] -> pass (J1)
  • mir::lower::tests::borrowck_alias_projection_recovery_does_not_panic: [missing] -> pass (J1)
  • mir::lower::tests::borrowck_tuple_field_projection_recovery_does_not_panic: [missing] -> pass (J1)
  • tests::record::in_own_default_impl: [missing] -> pass (J1)
  • typing::on_enter::tests::escapes_dollar_sign_in_brace_contents: [missing] -> pass (J1)

Stage 1

  • [mir-opt] tests/mir-opt/coroutine/unwind_in_vec.rs: [missing] -> pass (J1)
  • [ui] tests/ui/async-await/async-drop/async-drop-array-step.rs: [missing] -> pass (J2)
  • [ui] tests/ui/diagnostic_namespace/do_not_recommend/method_call.rs#current: [missing] -> pass (J2)
  • [ui] tests/ui/diagnostic_namespace/do_not_recommend/method_call.rs#next: [missing] -> pass (J2)
  • [ui] tests/ui/imports/private-import-suggestion-relative.rs: [missing] -> pass (J2)
  • ast::make::tests::expr_if_without_else_has_no_trailing_whitespace: [missing] -> pass (J3)
  • handlers::add_missing_impl_members::tests::issue_10326: [missing] -> pass (J3)
  • handlers::generate_function::tests::add_function_not_applicable_in_unresolved_module: [missing] -> pass (J3)
  • handlers::merge_imports::tests::test_merge_with_trailing_path_separator: [missing] -> pass (J3)
  • handlers::type_mismatch::tests::array_length: [missing] -> pass (J3)
  • handlers::unused_must_use::tests::block_tail_expression_in_stmt_position: [missing] -> pass (J3)
  • handlers::unused_must_use::tests::const_block_in_stmt_position: [missing] -> pass (J3)
  • handlers::unused_must_use::tests::if_branches_in_stmt_position: [missing] -> pass (J3)
  • handlers::unused_must_use::tests::match_arms_in_stmt_position: [missing] -> pass (J3)
  • handlers::unused_must_use::tests::must_use_type_through_block: [missing] -> pass (J3)
  • handlers::unused_must_use::tests::nested_block_tail_expression: [missing] -> pass (J3)
  • handlers::unused_must_use::tests::no_warning_when_block_tail_is_bound: [missing] -> pass (J3)
  • handlers::unused_must_use::tests::unsafe_block_tail_expression_in_stmt_position: [missing] -> pass (J3)
  • mir::lower::tests::borrowck_alias_projection_recovery_does_not_panic: [missing] -> pass (J3)
  • mir::lower::tests::borrowck_tuple_field_projection_recovery_does_not_panic: [missing] -> pass (J3)
  • tests::record::in_own_default_impl: [missing] -> pass (J3)
  • token_stream::tests::doc_comment_from_str: [missing] -> pass (J3)
  • typing::on_enter::tests::escapes_dollar_sign_in_brace_contents: [missing] -> pass (J3)
  • [ui (polonius)] tests/ui/async-await/async-drop/async-drop-array-step.rs: [missing] -> pass (J5)
  • [ui (polonius)] tests/ui/diagnostic_namespace/do_not_recommend/method_call.rs#current: [missing] -> pass (J5)
  • [ui (polonius)] tests/ui/diagnostic_namespace/do_not_recommend/method_call.rs#next: [missing] -> pass (J5)
  • [ui (polonius)] tests/ui/imports/private-import-suggestion-relative.rs: [missing] -> pass (J5)
  • [codegen] tests/codegen-llvm/issues/issue-91010.rs: [missing] -> pass (J6)

Stage 2

  • [ui] tests/ui/async-await/async-drop/async-drop-array-step.rs: [missing] -> pass (J0)
  • [ui] tests/ui/diagnostic_namespace/do_not_recommend/method_call.rs#current: [missing] -> pass (J0)
  • [ui] tests/ui/diagnostic_namespace/do_not_recommend/method_call.rs#next: [missing] -> pass (J0)
  • [ui] tests/ui/imports/private-import-suggestion-relative.rs: [missing] -> pass (J0)
  • [codegen] tests/codegen-llvm/issues/issue-91010.rs: [missing] -> pass (J4)
  • [mir-opt] tests/mir-opt/coroutine/unwind_in_vec.rs: [missing] -> pass (J7)

Additionally, 172 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 225e91c03da22cd4b9792b83c1cfc97967101614 --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-x86_64-apple: 2h 39m -> 1h 26m (-45.6%)
  2. x86_64-gnu-gcc-core-tests: 11m 43s -> 7m 48s (-33.4%)
  3. dist-aarch64-linux: 2h 33m -> 1h 47m (-30.2%)
  4. x86_64-gnu-gcc: 1h 9m -> 49m 32s (-28.7%)
  5. x86_64-gnu-next-trait-solver-polonius: 58m 13s -> 42m 28s (-27.1%)
  6. x86_64-msvc-ext1: 2h 4m -> 1h 32m (-25.7%)
  7. x86_64-mingw-2: 2h 36m -> 1h 57m (-24.8%)
  8. i686-gnu-nopt-1: 1h 42m -> 2h 7m (+24.3%)
  9. x86_64-msvc-2: 2h 19m -> 1h 50m (-21.2%)
  10. dist-powerpc64-linux-musl: 1h 16m -> 1h 31m (+19.5%)
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
#159210 rust-analyzer subtree update eb3d6c38583fa6f7d5f91bd628d8bf09d4051ec4 (link)
#158655 Fix coroutine MIR saved local remapping 68ede2709c0bb55898945996db0dd7356ec30284 (link)
#159205 bootstrap: Replace ShouldRun::crates with `crate_or_deps_… 6da85d6b5932b83727d8abf64212688cad361c67 (link)
#159208 Fix attr_on_non_tail_expr typo 94f6058bbba9a8439b3b8d86c4448dafead8bd4d (link)
#157524 Fix relative paths in private import suggestions c17e592132d33c3aa02c7bcd621c47c8ccce0488 (link)
#158325 Document NonNull layout guarantees ac98416ea0c9ff04b329aa38b412ae0ea12149a8 (link)
#158882 enable do_not_recommend attr for method call errors in cu… f5301e1c355540aa2650743b2c995f4e94fe659d (link)
#158982 Pretty-print MIR user types too. e635beae0d660b6241f2a7e51cfcbf162c63aeb1 (link)
#159069 Add codegen test for constant returns after local use 02372f54906c73dd1f94a98ad2b6a0baa30f7fda (link)
#159163 rustc_target: Add acquire-release to implied features of v8 adb9d0615ba64d54d21688cb14334e67de66c4dd (link)
#159201 borrowck: Represent 'best blame constraint' as index into `… b1eac8c9e74f1ba355e23ba44d77417cf69aa9fb (link)

previous master: 5503df8734

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

Max RSS (memory usage)

Results (primary -2.3%)

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)
-2.3% [-2.4%, -2.1%] 2
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -2.3% [-2.4%, -2.1%] 2

Cycles

Results (secondary -3.7%)

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

Binary size

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

Bootstrap: 487.42s -> 488.117s (0.14%)
Artifact size: 389.91 MiB -> 389.87 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-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-rust-analyzer Relevant to the rust-analyzer team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.