Skip to content

Conversation

@lnicola
Copy link
Member

@lnicola lnicola commented Jan 12, 2026

Subtree update of rust-analyzer to rust-lang/rust-analyzer@27f1724.

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

r? @ghost

tilladam and others added 30 commits January 5, 2026 08:41
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`
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.
fix: Properly lower `SelfOnly` predicates
This updates the rust-version file to 548e586.
Wilfred and others added 26 commits January 9, 2026 12:01
rust-analyzer has handy prebuilt `cargo doc` output at
https://rust-lang.github.io/rust-analyzer/ide/

However, it doesn't include private definitions, which makes it less
useful when trying to learn unfamiliar parts of the codebase.

Instead, pass `--document-private-items` so the HTML includes
information on private types and modules too. rustdoc renders these
with a padlock icon, so it's still clear that they're private.

This change also exposes some more rustdoc warnings, which I've fixed.
internal: Include private definitions in generated rustdoc
Its job is now done elsewhere, and it's also wrong (not accounting for autoderef)
…me-diag

fix: Fix lifetimes len diagnostics for fn pointers
feat: Allow rust paths in symbol search
fix: Remove code made redundant by method resolution rewrite
internal: Abstract proc-macro-srv and proc-macro-api stdin and stdout away
…ribute-with-reason

Fix ignore flag for test attributes with values
…e-range

Implement Span::ByteRange for proc-macro-srv
This updates the rust-version file to 44a5b55.
internal: Land integration test infra for proc-macro-srv-cli
…ruqm

fix: Fix crate root search in world symbols duplicating root entries
@rustbot
Copy link
Collaborator

rustbot commented Jan 12, 2026

rust-analyzer is developed in its own repository. If possible, consider making this change to rust-lang/rust-analyzer instead.

cc @rust-lang/rust-analyzer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rust-analyzer Relevant to the rust-analyzer team, which will review and decide on the PR/issue. labels Jan 12, 2026
@rust-log-analyzer
Copy link
Collaborator

The job aarch64-gnu-llvm-20-2 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
[RUSTC-TIMING] cfg test:true 5.797
[RUSTC-TIMING] rust_analyzer_proc_macro_srv test:true 0.868
error: cannot satisfy dependencies so `std` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away
  = note: `std` was unavailable as a static crate, preventing fully static linking
  = help: `feature(rustc_private)` is needed to link to the compiler's `rustc_driver` library

error: cannot satisfy dependencies so `core` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away
  = help: `feature(rustc_private)` is needed to link to the compiler's `rustc_driver` library

error: cannot satisfy dependencies so `alloc` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away
  = help: `feature(rustc_private)` is needed to link to the compiler's `rustc_driver` library

error: cannot satisfy dependencies so `compiler_builtins` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away
  = help: `feature(rustc_private)` is needed to link to the compiler's `rustc_driver` library

error: cannot satisfy dependencies so `libc` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away
  = help: `feature(rustc_private)` is needed to link to the compiler's `rustc_driver` library

error: cannot satisfy dependencies so `rustc_std_workspace_core` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away
  = help: `feature(rustc_private)` is needed to link to the compiler's `rustc_driver` library

error: cannot satisfy dependencies so `unwind` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away
  = help: `feature(rustc_private)` is needed to link to the compiler's `rustc_driver` library

error: cannot satisfy dependencies so `miniz_oxide` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away
  = help: `feature(rustc_private)` is needed to link to the compiler's `rustc_driver` library

error: cannot satisfy dependencies so `adler2` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away
  = help: `feature(rustc_private)` is needed to link to the compiler's `rustc_driver` library

error: cannot satisfy dependencies so `hashbrown` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away
  = help: `feature(rustc_private)` is needed to link to the compiler's `rustc_driver` library

error: cannot satisfy dependencies so `rustc_std_workspace_alloc` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away
  = help: `feature(rustc_private)` is needed to link to the compiler's `rustc_driver` library

error: cannot satisfy dependencies so `std_detect` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away
  = help: `feature(rustc_private)` is needed to link to the compiler's `rustc_driver` library

error: cannot satisfy dependencies so `rustc_demangle` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away
  = help: `feature(rustc_private)` is needed to link to the compiler's `rustc_driver` library

error: cannot satisfy dependencies so `cfg_if` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away
  = help: `feature(rustc_private)` is needed to link to the compiler's `rustc_driver` library

error: cannot satisfy dependencies so `addr2line` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away
  = help: `feature(rustc_private)` is needed to link to the compiler's `rustc_driver` library

error: cannot satisfy dependencies so `gimli` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away
  = help: `feature(rustc_private)` is needed to link to the compiler's `rustc_driver` library

error: cannot satisfy dependencies so `object` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away
  = help: `feature(rustc_private)` is needed to link to the compiler's `rustc_driver` library

error: cannot satisfy dependencies so `memchr` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away
  = help: `feature(rustc_private)` is needed to link to the compiler's `rustc_driver` library

error: cannot satisfy dependencies so `panic_unwind` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away
  = help: `feature(rustc_private)` is needed to link to the compiler's `rustc_driver` library

[RUSTC-TIMING] legacy_json test:true 0.717
error: could not compile `proc-macro-srv-cli` (test "legacy_json") due to 19 previous errors
warning: build failed, waiting for other jobs to finish...
[RUSTC-TIMING] ide test:false 67.319
[RUSTC-TIMING] minimal_lsp test:false 11.000
[RUSTC-TIMING] rust_analyzer test:false 68.199
Bootstrap failed while executing `--stage 2 test --skip tests --skip coverage-map --skip coverage-run --skip library --skip tidyselftest`

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

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. 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.