Skip to content

Rollup of 7 pull requests#152035

Merged
rust-bors[bot] merged 241 commits intorust-lang:mainfrom
Zalathar:rollup-Ur7QmrJ
Feb 3, 2026
Merged

Rollup of 7 pull requests#152035
rust-bors[bot] merged 241 commits intorust-lang:mainfrom
Zalathar:rollup-Ur7QmrJ

Conversation

@Zalathar
Copy link
Member

@Zalathar Zalathar commented Feb 3, 2026

Successful merges:

r? @ghost

Create a similar rollup

A4-Tacks and others added 30 commits January 2, 2026 18:25
Fix not applicable in statement when exist else block

Example
---
```rust
fn main() {
    some_statements();
    if$0 let Ok(x) = Err(92) {
        foo(x);
    } else {
        return;
    }
    some_statements();
}
```

**Before this PR**

Assist not applicable

**After this PR**

```rust
fn main() {
    some_statements();
    let Ok(x) = Err(92) else {
        return;
    };
    foo(x);
    some_statements();
}
```
Add proper line/column resolution for proc-macro spans via a callback
mechanism. Previously these methods returned hardcoded 1 values.

The implementation adds:
- SubRequest::LineColumn and SubResponse::LineColumnResult to the
  bidirectional protocol
- ProcMacroClientInterface::line_column() method
- Callback handling in load-cargo using LineIndex
- Server implementation in RaSpanServer that uses the callback
- a test for Span::line() and Span::column() in proc-macro server

Add fn_like_span_line_column test proc-macro that exercises the new
line/column API, and a corresponding test with a mock callback.
Implement Span::line() and Span::column() for proc-macro server
perf: Re-use scratch allocations for `try_evaluate_obligations`
Example
---
```rust
fn main() {
    let cond = true;
    match 92 {
        3 => true,
        x if cond => if x $0> 10 {
            false
        } else if x > 5 {
            true
        } else if x > 4 || x < -2 {
            false
        } else {
            true
        },
    }
}
```

**Before this PR**

```rust
fn main() {
    let cond = true;
    match 92 {
        3 => true,
        x if x > 10 => false,
        x if x > 5 => true,
        x if x > 4 || x < -2 => false,
        x => true,
    }
}
```

**After this PR**

```rust
fn main() {
    let cond = true;
    match 92 {
        3 => true,
        x if cond && x > 10 => false,
        x if cond && x > 5 => true,
        x if cond && (x > 4 || x < -2) => false,
        x if cond => true,
    }
}
```
fix: Suggest traits other than ones in the environment crate
Needed to support flychecking in a later diff
Needed for all_workspace_dependencies_for_package implementation.
This exited the whole loop instead of having continue semantics and
continuing to find workspaces. So wrap in find_map.
You should be able to flycheck a ProjectJson crate based on its build label.
This paves the way for that.

Context: I don't think this has been working for some time. It used to be that
we would use cargo to build ProjectJson crates. Support for ProjectJson seems
to have been somewhat steamrolled in PR 18845 (e4bf6e1bc36e4cbc8a36d7911788176eb9fac76e).
We need to distinguish from RunnableKind::Check, which is
human-readable.
This adds a substitution helper to get the right behaviour re {label} and $saved_file.
… rust-project.json

This requires us to add $saved_file / {saved_file} interpolation back to restart_for_package.
Otherwise we break existing users of $saved_file. No grand reason why we can't delete saved_file
later, although I would just leave it because sometimes a build system might really know better
which target(s) to build, including multiple targets.
…roject.json runnable

For JSON / override users, pretty-print the custom flycheck command with fewer quote characters

Better debug logging in flycheck
Because (1) it is what we use when there is no relevant config
        (2) we automatically use either rust-project.json's flycheck, or cargo

This also puts check_command config into CargoOptions. It's a cargo option, after all.
It was pretty useless without this.

Previously:

    Parsing target pattern `{label}`

    Caused by:
        Invalid target name `{label}`. (...)
    Build ID: 6dab5942-d81c-4430-83b0-5ba523999050
    Network: Up: 0B  Down: 0B
    Command: run.
    Time elapsed: 0.3s
    BUILD FAILED

     *  The terminal process "buck2 'run', '{label}'" terminated with exit code: 3.
rust-project requires {arg} these days. No good giving people bad information
even if it's not crucial to documenting this.
I am not familiar with this code at allso just doing what I can to unblock.
…mic-v2, r=jdonszelmann

compiletest: Don't assume `aux-crate` becomes a `*.so` with `no-prefer-dynamic`

Since it does not make sense to do so. If someone prefers no dynamic stuff, the last thing they want to look for is an .so file. Also add a regression test. Without the fix, the test fails with:

    error: test compilation failed although it shouldn't!
    --- stderr -------------------------------
    error: extern location for no_prefer_dynamic_lib does not exist: .../auxiliary/libno_prefer_dynamic_lib.so
      --> .../no-prefer-dynamic-means-no-so.rs:9:5
       |
    LL |     no_prefer_dynamic_lib::return_42();
       |     ^^^^^^^^^^^^^^^^^^^^^

### Needed by:
-  rust-lang#150591 because of rust-lang#151271. But IMHO this PR makes sense on its own.

### Must wait for:
- [x] rust-lang#151695
…hercote

fix: Make `--color always` always print color with `--explain`

Fixes rust-lang#151643.

This changes the behaviour of `handle_explain` in `rustc_driver_impl` to always output color when the `--color always` flag is set.

r? @tgross35
…hs, r=lqd

Remove `with_no_trimmed_paths` use in query macro

We already use `with_no_trimmed_paths!` when calling query descriptors so the extra call generated by the macro is not needed.
…r=jdonszelmann

Convert to inline diagnostics in `rustc_driver_impl`

Converts a crate for rust-lang#151366
This PR is almost completely autogenerated by a hacky script I have locally :)
@rust-bors rust-bors bot added the rollup A PR which is a rollup label Feb 3, 2026
@rustbot rustbot added A-compiler-builtins Area: compiler-builtins (https://github.com/rust-lang/compiler-builtins) A-compiletest Area: The compiletest test runner A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. 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. labels Feb 3, 2026
@Zalathar
Copy link
Member Author

Zalathar commented Feb 3, 2026

Rollup of everything.

@bors r+ rollup=never p=5

@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 3, 2026

📌 Commit b0552e6 has been approved by Zalathar

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 Feb 3, 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 Feb 3, 2026
@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 3, 2026

☀️ Test successful - CI
Approved by: Zalathar
Duration: 3h 9m 14s
Pushing 79a1e77 to main...

@rust-bors rust-bors bot merged commit 79a1e77 into rust-lang:main Feb 3, 2026
12 checks passed
@rustbot rustbot added this to the 1.95.0 milestone Feb 3, 2026
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#151109 fN::BITS constants for feature float_bits_const e37a8ac2d5fd204e4006bbd4eb137c1e852c80aa (link)
#151691 compiletest: Don't assume aux-crate becomes a *.so with… 58b9d15ec4ef59dbcba4e63cc20fafdd94971f27 (link)
#151919 fix: Make --color always always print color with `--expla… 9b07264af8a9e3815d00a09c7508c2e0775036cd (link)
#151976 Rename collect_active_jobs to several distinct names a46b8bccac8975623383512fdff4ecbf35b3fc8d (link)
#152008 rust-analyzer subtree update 9ae3098a9e46e18f7b7c6935324e1731bd6e1136 (link)
#152017 Remove with_no_trimmed_paths use in query macro 5d0b3757ac29ad1442a65943cf13a7989cea6d62 (link)
#152028 Convert to inline diagnostics in rustc_driver_impl 3c62c3d51a0c1ae8c58bf687be2312a70ddf4aac (link)

previous master: 46c86aef65

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

github-actions bot commented Feb 3, 2026

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 46c86ae (parent) -> 79a1e77 (this PR)

Test differences

Show 888 test diffs

Stage 0

  • flycheck::tests::test_substitutions: [missing] -> pass (J1)
  • handlers::apply_demorgan::tests::demorgan_doesnt_handles_pattern: [missing] -> pass (J1)
  • handlers::convert_to_guarded_return::tests::convert_if_let_has_else_block_in_statement: [missing] -> pass (J1)
  • handlers::convert_to_guarded_return::tests::ignore_if_inside_let: [missing] -> pass (J1)
  • handlers::extract_function::tests::with_cfg_attr: [missing] -> pass (J1)
  • handlers::missing_fields::tests::test_default_field_values_basic: [missing] -> pass (J1)
  • handlers::missing_fields::tests::test_default_field_values_pattern_matching: [missing] -> pass (J1)
  • handlers::move_guard::tests::move_guard_to_block_arm_body_works: [missing] -> pass (J1)
  • handlers::remove_parentheses::tests::remove_parens_conflict_cast_before_l_angle: [missing] -> pass (J1)
  • handlers::unwrap_block::tests::unwrap_match_arm_in_let: [missing] -> pass (J1)
  • hover::tests::doc_link_enum_self_variant: [missing] -> pass (J1)
  • hover::tests::doc_link_trait_self: [missing] -> pass (J1)
  • legacy_protocol::msg::tests::test_proc_macro_rpc_works_ts: pass -> [missing] (J1)
  • macro_expansion_tests::mbe::matching::meta_fat_arrow: [missing] -> pass (J1)
  • nameres::tests::imports::kw_path_renames: [missing] -> pass (J1)
  • nameres::tests::imports::primitive_reexport: [missing] -> pass (J1)
  • nameres::tests::primitives::primitive_reexport: pass -> [missing] (J1)
  • session_diagnostics::verify_driver_impl_ice_8: pass -> [missing] (J1)
  • session_diagnostics::verify_driver_impl_ice_bug_report_internal_feature_11: pass -> [missing] (J1)
  • session_diagnostics::verify_driver_impl_ice_bug_report_update_note_10: pass -> [missing] (J1)
  • session_diagnostics::verify_driver_impl_ice_flags_14: pass -> [missing] (J1)
  • session_diagnostics::verify_driver_impl_rlink_corrupt_file_7: pass -> [missing] (J1)
  • session_diagnostics::verify_driver_impl_rlink_empty_version_number_3: pass -> [missing] (J1)
  • session_diagnostics::verify_driver_impl_rlink_encoding_version_mismatch_4: pass -> [missing] (J1)
  • session_diagnostics::verify_driver_impl_rlink_unable_to_read_1: pass -> [missing] (J1)
  • session_diagnostics::verify_driver_impl_unstable_feature_usage_16: pass -> [missing] (J1)
  • symbol_index::tests::test_crate_search_all: [missing] -> pass (J1)
  • symbol_index::tests::test_fuzzy_item_with_path: [missing] -> pass (J1)
  • symbol_index::tests::test_parse_path_query: [missing] -> pass (J1)
  • symbol_index::tests::test_path_search: [missing] -> pass (J1)
  • symbol_index::tests::test_path_search_with_use_reexport: [missing] -> pass (J1)
  • symbol_index::tests::test_root_module_items: [missing] -> pass (J1)
  • syntax_highlighting::tests::test_strings_highlighting_disabled: [missing] -> pass (J1)
  • tests::closure_captures::nested_ref_captures: [missing] -> pass (J1)
  • tests::flyimport::trait_method_import_across_multiple_crates: [missing] -> pass (J1)
  • tests::opaque_types::regression_21455: [missing] -> pass (J1)
  • tests::record::functional_update_fields_completion: [missing] -> pass (J1)
  • tests::regression::issue_21006_generic_predicates_for_param_supertrait_cycle: [missing] -> pass (J1)
  • tests::regression::new_solver::regression_19339: [missing] -> pass (J1)
  • tests::simple::infer_ranges_new_range: [missing] -> pass (J1)
  • tests::simple::naked_asm_returns_never: [missing] -> pass (J1)
  • tests::simple::regression_21478: [missing] -> pass (J1)
  • tests::type_pos::inferred_type_static: [missing] -> pass (J1)

Stage 1

  • expr_store::tests::body::async_fn_weird_param_patterns: [missing] -> pass (J0)
  • handlers::apply_demorgan::tests::demorgan_doesnt_handles_pattern: [missing] -> pass (J0)
  • handlers::convert_range_for_to_while::tests::test_convert_range_for_to_while_with_continue: [missing] -> pass (J0)
  • handlers::convert_to_guarded_return::tests::convert_if_let_has_else_block_in_statement: [missing] -> pass (J0)
  • handlers::convert_to_guarded_return::tests::ignore_else_if: [missing] -> pass (J0)
  • handlers::missing_fields::tests::test_default_field_values_basic: [missing] -> pass (J0)
  • handlers::missing_fields::tests::test_default_field_values_missing_field_error: [missing] -> pass (J0)
  • handlers::missing_fields::tests::test_default_field_values_pattern_matching: [missing] -> pass (J0)
  • handlers::move_guard::tests::move_guard_to_block_arm_body_works: [missing] -> pass (J0)
  • handlers::unwrap_block::tests::unwrap_match_arm_in_let: [missing] -> pass (J0)
  • macro_expansion_tests::mbe::matching::meta_fat_arrow: [missing] -> pass (J0)
  • nameres::tests::primitives::primitive_reexport: pass -> [missing] (J0)
  • symbol_index::tests::test_absolute_path_search: [missing] -> pass (J0)
  • symbol_index::tests::test_crate_search_all: [missing] -> pass (J0)
  • symbol_index::tests::test_crate_search_fuzzy: [missing] -> pass (J0)
  • symbol_index::tests::test_fuzzy_item_with_path: [missing] -> pass (J0)
  • symbol_index::tests::test_parse_path_query: [missing] -> pass (J0)
  • symbol_index::tests::test_path_search: [missing] -> pass (J0)
  • symbol_index::tests::test_path_search_module: [missing] -> pass (J0)
  • symbol_index::tests::test_path_search_with_use_reexport: [missing] -> pass (J0)
  • symbol_index::tests::test_root_module_items: [missing] -> pass (J0)
  • syntax_highlighting::tests::test_strings_highlighting_disabled: [missing] -> pass (J0)
  • test_basic_call_flow: [missing] -> pass (J0)
  • test_bidi_list_macros: [missing] -> pass (J0)
  • test_bidi_set_config: [missing] -> pass (J0)
  • test_bidi_set_config_rust_analyzer_mode: [missing] -> pass (J0)
  • test_bidi_version_check_bidirectional: [missing] -> pass (J0)
  • test_expand_nonexistent_macro: [missing] -> pass (J0)
  • test_list_macros: [missing] -> pass (J0)
  • test_set_config: [missing] -> pass (J0)
  • test_version_check: [missing] -> pass (J0)
  • tests::closure_captures::nested_ref_captures: [missing] -> pass (J0)
  • tests::closure_captures::nested_ref_captures_from_outer: [missing] -> pass (J0)
  • tests::flyimport::trait_method_import_across_multiple_crates: [missing] -> pass (J0)
  • tests::opaque_types::regression_21455: [missing] -> pass (J0)
  • tests::record::functional_update_fields_completion: [missing] -> pass (J0)
  • tests::regression::issue_21006_self_assoc_trait: [missing] -> pass (J0)
  • tests::regression::new_solver::regression_21315: [missing] -> pass (J0)
  • tests::regression::regression_21429: [missing] -> pass (J0)
  • tests::simple::naked_asm_returns_never: [missing] -> pass (J0)
  • tests::simple::regression_21478: [missing] -> pass (J0)
  • tests::test_fn_like_span_line_column: [missing] -> pass (J0)
  • tests::type_pos::inferred_type_static: [missing] -> pass (J0)
  • [ui] tests/ui/compiletest-self-test/no-prefer-dynamic-means-no-so.rs: [missing] -> pass (J1)
  • session_diagnostics::verify_driver_impl_cant_emit_mir_0: pass -> [missing] (J2)
  • session_diagnostics::verify_driver_impl_ice_8: pass -> [missing] (J2)
  • session_diagnostics::verify_driver_impl_ice_bug_report_update_note_10: pass -> [missing] (J2)
  • session_diagnostics::verify_driver_impl_ice_exclude_cargo_defaults_15: pass -> [missing] (J2)
  • session_diagnostics::verify_driver_impl_ice_flags_14: pass -> [missing] (J2)
  • session_diagnostics::verify_driver_impl_rlink_corrupt_file_7: pass -> [missing] (J2)
  • session_diagnostics::verify_driver_impl_rlink_empty_version_number_3: pass -> [missing] (J2)
  • session_diagnostics::verify_driver_impl_rlink_no_a_file_6: pass -> [missing] (J2)
  • session_diagnostics::verify_driver_impl_rlink_rustc_version_mismatch_5: pass -> [missing] (J2)
  • session_diagnostics::verify_driver_impl_rlink_unable_to_read_1: pass -> [missing] (J2)
  • session_diagnostics::verify_driver_impl_rlink_wrong_file_type_2: pass -> [missing] (J2)
  • session_diagnostics::verify_driver_impl_unstable_feature_usage_16: pass -> [missing] (J2)

Stage 2

  • [ui] tests/ui/compiletest-self-test/no-prefer-dynamic-means-no-so.rs: [missing] -> pass (J3)

(and 62 additional test diffs)

Additionally, 726 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 79a1e77fe34b70de8b9b9e7c44ff251003b70aaf --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: 6246.5s -> 8898.1s (+42.4%)
  2. dist-apple-various: 5374.8s -> 3869.2s (-28.0%)
  3. pr-check-1: 1724.8s -> 2007.2s (+16.4%)
  4. dist-ohos-x86_64: 4788.5s -> 4360.5s (-8.9%)
  5. dist-armv7-linux: 5588.6s -> 5101.5s (-8.7%)
  6. pr-check-2: 2346.2s -> 2548.7s (+8.6%)
  7. x86_64-mingw-2: 8955.2s -> 9728.1s (+8.6%)
  8. dist-various-2: 2189.9s -> 2375.6s (+8.5%)
  9. arm-android: 5868.2s -> 6340.0s (+8.0%)
  10. dist-arm-linux-gnueabi: 5444.8s -> 5019.9s (-7.8%)
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 (79a1e77): comparison URL.

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

Max RSS (memory usage)

Results (primary 1.9%)

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

mean range count
Regressions ❌
(primary)
2.7% [2.4%, 3.0%] 4
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-1.1% [-1.1%, -1.1%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.9% [-1.1%, 3.0%] 5

Cycles

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

Binary size

Results (secondary 0.0%)

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

Bootstrap: 474.728s -> 473.794s (-0.20%)
Artifact size: 397.84 MiB -> 397.86 MiB (0.00%)

@Zalathar Zalathar deleted the rollup-Ur7QmrJ branch February 3, 2026 23:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-compiler-builtins Area: compiler-builtins (https://github.com/rust-lang/compiler-builtins) A-compiletest Area: The compiletest test runner A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) A-testsuite Area: The testsuite used to check the correctness of rustc 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.