Skip to content

rust-analyzer subtree update#155227

Merged
rust-bors[bot] merged 17 commits intorust-lang:mainfrom
lnicola:sync-from-ra
Apr 13, 2026
Merged

rust-analyzer subtree update#155227
rust-bors[bot] merged 17 commits intorust-lang:mainfrom
lnicola:sync-from-ra

Conversation

@lnicola
Copy link
Copy Markdown
Member

@lnicola lnicola commented Apr 13, 2026

Shourya742 and others added 17 commits April 9, 2026 20:48
When `rustfmt.overrideCommand` is a relative path, it's joined with the
workspace root to make it an absolute path. Without this the command
path can't be resolved, especially because rustfmt changes the cwd to
make sure rustfmt.toml works correctly.

Currently `run_rustfmt` only does this when it finds a `target_spec`
using `target_spec_for_file` which only works for the root file of the
target.

This commit changes it to use `TargetSpec::from_file` which works for
any file in the crate.
config: `rust-analyzer.completion.termSearch.enable: true`

Example
---
```rust
fn bar() -> Bar {
    <Bar>::$0
}

trait Foo { fn foo() -> Self; }
struct Bar;
impl Bar { fn bar() {} }
impl Foo for Bar {
    fn foo() -> Self { Bar }
}
```

**Before this PR**

```rust
fn bar()                  fn()
fn foo() (as Foo) fn() -> Self
ex Bar
ex Bar::foo()
ex bar()
```

**After this PR**

```rust
fn bar()                  fn()
fn foo() (as Foo) fn() -> Self
```
Example
---
```rust
fn main() {
    <Bar as Foo>::foo$0
}
mod m {
    pub fn foo() {}
}
struct Bar;
trait Foo {}
impl Foo for Bar {}
```

**Before this PR**

```
fn foo() (use m::foo) fn()
```

**After this PR**

no any imports
internal: Use create-github-app-token to get token for gen-lints
…try-normalize-use-tree

Remove try-normalize-use-tree
…p-token

minor: Bump create-github-app-token
Fix rustfmt relative custom command
This allows us to simplify expansion of cfg_attr in `expand_cfg_attr()`, and also fixes a bunch of bugs like expansion of `doc = macro!()` inside `cfg_attr`.
…attr

fix: Parse `cfg_attr` and `cfg` specially
…chor-qualifier

fix: no imports on type anchor qualified path
fix: no complete term expressions on qualified path
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 13, 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 Apr 13, 2026
@lnicola
Copy link
Copy Markdown
Member Author

lnicola commented Apr 13, 2026

@bors r+ p=1

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Apr 13, 2026

📌 Commit c0ad604 has been approved by lnicola

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 Apr 13, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Apr 13, 2026
rust-bors Bot pushed a commit that referenced this pull request Apr 13, 2026
…uwer

Rollup of 10 pull requests

Successful merges:

 - #155227 (`rust-analyzer` subtree update)
 - #153335 (Add #![unstable_removed(..)] attribute to track removed features)
 - #154932 (Handle RTN projections in assoc type restriction diagnostics)
 - #155096 (delegation: support proper interaction of user-specified args and impl Traits)
 - #155106 (cg_llvm: scalable vectors with `simd_cast` and `simd_select`)
 - #155140 (add regression test for OpenOptionsExt downstream compat)
 - #155182 (Make the expansion of guard metavars begin guard non-terminals)
 - #155226 (delegation: revert execution of hir_crate_items before delayed lowering)
 - #153997 (Use closures more consistently in `dep_graph.rs`.)
 - #155003 (update thin-vec)
@rust-bors rust-bors Bot merged commit 23c6bc9 into rust-lang:main Apr 13, 2026
11 checks passed
@rustbot rustbot added this to the 1.97.0 milestone Apr 13, 2026
rust-timer added a commit that referenced this pull request Apr 13, 2026
Rollup merge of #155227 - lnicola:sync-from-ra, r=lnicola

`rust-analyzer` subtree update

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

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

r? @ghost
@lnicola lnicola deleted the sync-from-ra branch April 13, 2026 18:37
github-actions Bot pushed a commit to rust-lang/rustc-dev-guide that referenced this pull request Apr 13, 2026
…uwer

Rollup of 10 pull requests

Successful merges:

 - rust-lang/rust#155227 (`rust-analyzer` subtree update)
 - rust-lang/rust#153335 (Add #![unstable_removed(..)] attribute to track removed features)
 - rust-lang/rust#154932 (Handle RTN projections in assoc type restriction diagnostics)
 - rust-lang/rust#155096 (delegation: support proper interaction of user-specified args and impl Traits)
 - rust-lang/rust#155106 (cg_llvm: scalable vectors with `simd_cast` and `simd_select`)
 - rust-lang/rust#155140 (add regression test for OpenOptionsExt downstream compat)
 - rust-lang/rust#155182 (Make the expansion of guard metavars begin guard non-terminals)
 - rust-lang/rust#155226 (delegation: revert execution of hir_crate_items before delayed lowering)
 - rust-lang/rust#153997 (Use closures more consistently in `dep_graph.rs`.)
 - rust-lang/rust#155003 (update thin-vec)
github-actions Bot pushed a commit to rust-lang/rust-analyzer that referenced this pull request Apr 16, 2026
…uwer

Rollup of 10 pull requests

Successful merges:

 - rust-lang/rust#155227 (`rust-analyzer` subtree update)
 - rust-lang/rust#153335 (Add #![unstable_removed(..)] attribute to track removed features)
 - rust-lang/rust#154932 (Handle RTN projections in assoc type restriction diagnostics)
 - rust-lang/rust#155096 (delegation: support proper interaction of user-specified args and impl Traits)
 - rust-lang/rust#155106 (cg_llvm: scalable vectors with `simd_cast` and `simd_select`)
 - rust-lang/rust#155140 (add regression test for OpenOptionsExt downstream compat)
 - rust-lang/rust#155182 (Make the expansion of guard metavars begin guard non-terminals)
 - rust-lang/rust#155226 (delegation: revert execution of hir_crate_items before delayed lowering)
 - rust-lang/rust#153997 (Use closures more consistently in `dep_graph.rs`.)
 - rust-lang/rust#155003 (update thin-vec)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

7 participants