Skip to content

Conversation

@jhpratt
Copy link
Member

@jhpratt jhpratt 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.
`rust-analyzer` subtree update

Subtree update of `rust-analyzer` to rust-lang/rust-analyzer@7cb789d.

Created using https://github.com/rust-lang/josh-sync.

r? @ghost
fN::BITS constants for feature float_bits_const

Also enables the feature for compiler_builtins as otherwise this causes a warning and conflicts with the Float extension trait.

---
Implementation for rust-lang#151073

Feature flag: `#![feature(float_bits_const)]`

Note that this is likely to conflict with some extension traits, as it has with compiler builtins. However, assuming correct values for the constants, they are either `u32`, the same type, which should not cause a problem (as shown by enabling the feature for compiler_builtins), or a different type (e.g. `usize`), which should cause a compiler error. Either way this should never change behaviour unless the extension trait implemented an incorrect value.

Also note that it doesn't seem to be possible to put multiple unstable attributes on an item, so `f128::BITS` and `f16::BITS` are gated behind the feature flags for those primitives, rather than `#![feature(float_bits_const)]`
…ethercote

Rename `collect_active_jobs` to several distinct names

Key renames:
- Function `collect_active_jobs` → `collect_active_jobs_from_all_queries` (method in trait `QueryContext`)
- Constant `COLLECT_ACTIVE_JOBS` → `PER_QUERY_GATHER_ACTIVE_JOBS_FNS` (list of per-query function pointers)
- Function `collect_active_jobs` → `gather_active_jobs` (per-query function in `query_impl::$name`)
- Function `collect_active_jobs` → `gather_active_jobs_inner` (method in `QueryState`)
  - Giving these four things distinct names makes it a lot easier to tell them apart!
  - The switch from “collect” (all queries) to “gather” (single query) is intended to make the different parts a bit more memorable and searchable; I couldn't think of a more natural way to express this distinction so I settled for two different synonyms.

There should be no change to compiler behaviour.

r? nnethercote (or compiler)
…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
…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
@jhpratt
Copy link
Member Author

jhpratt commented Feb 3, 2026

@bors r+ rollup=never p=5

@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 3, 2026

📌 Commit afb6ffe 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 Feb 3, 2026
@rust-bors

This comment has been minimized.

rust-bors bot pushed a commit that referenced this pull request Feb 3, 2026
Rollup of 6 pull requests

Successful merges:

 - #152008 (`rust-analyzer` subtree update)
 - #151109 (fN::BITS constants for feature float_bits_const)
 - #151976 (Rename `collect_active_jobs` to several distinct names)
 - #151691 (compiletest: Don't assume `aux-crate` becomes a `*.so` with `no-prefer-dynamic`)
 - #151919 (fix: Make `--color always` always print color with `--explain`)
 - #152028 (Convert to inline diagnostics in `rustc_driver_impl`)
@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 Feb 3, 2026
@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 3, 2026

💔 Test for e8643cc failed: CI, CI

@Zalathar
Copy link
Member

Zalathar commented Feb 3, 2026

@Kobzol I think something weird happened to bors here that might warrant a look.

Something about a “higher priority” job that never actually existed.

@Kobzol
Copy link
Member

Kobzol commented Feb 3, 2026

Interesting, seems like GitHub started the CI workflow twice for the same commit. I'll examine the logs. Even though bors is prepared for multiple workflows, there are some diagnostics that don't handle it well, as the previous bors comment shows. I'll fix that too.

@Kobzol
Copy link
Member

Kobzol commented Feb 3, 2026

Yeah so we definitely received a webhook that the bors/automation/auto branch was pushed twice, and then we received also the workflow started webhook twice. Not really sure what happened there, because bors pushed to the branch only once (as it should), based on the logs. I guess some GitHub issue 🤷

@Kobzol Kobzol closed this Feb 3, 2026
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 3, 2026
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 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.