rust-analyzer subtree update#159210
Merged
Merged
Conversation
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.
Add a simple info log statement when cache priming finishes on startup. Disclosure: Anthropic Claude 3.5 Flash assisted with this change.
AI-assisted-by: OpenAI Codex
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.
internal: Remove dead struct field
…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`
…base internal: remove `ExpandDatabase`
Instead of constructing both kinds of expanders in the same macro call, construct them in two. This allows for some deduplication in the macro definition. AFAICT having everything in the same macro was necessary in order to implement `find_by_name`, but I've changed it to be a method on each of the expanders, with `find_builtin_macro` calling both and combining their results. Also the macro now accepts an optional trailing comma. All of this makes the macro more similar to the ones in `attr_macro` and `derive_macro`.
by reusing the function escape_snippet_bits used in postfix.rs, the issue seems to be gone completely. made one test cases, using $bar as per the issue rust-lang#22596 by kpreid. tried making a $0 test case but although it was working on the IDE, the test case always failed. a possible improvement would be moving escape_snippet_bits to place where both postfix.rs and on_enter.rs can see it, but im not sure where I would do that...
fix: clamp cttz const-eval result to type width
Example --- ```rust const VALS: [i32; 2$0] = [1, 2, 3]; ``` **Before this PR** No available fixes **After this PR** ```rust const VALS: [i32; 3] = [1, 2, 3]; ```
feat: add fixes for array length for type_mismatch
After we removed `DefDatabase`, it is now always `SourceDatabase`.
internal: Remove the `Database` assoc type from the `Intern` & `Lookup` traits
Collaborator
|
cc @rust-lang/rust-analyzer |
Collaborator
Member
Author
|
@bors r+ p=1 |
Contributor
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>`)
Contributor
|
⌛ Testing commit 63344e6 with merge bdce362... Workflow: https://github.com/rust-lang/rust/actions/runs/29246732134 |
rust-bors Bot
pushed a commit
that referenced
this pull request
Jul 13, 2026
`rust-analyzer` subtree update Subtree update of `rust-analyzer` to rust-lang/rust-analyzer@ffcdbbd. Created using https://github.com/rust-lang/josh-sync. r? @ghost
Contributor
|
@bors yield |
Contributor
|
Auto build was cancelled. Cancelled workflows: The next pull request likely to be tested is #159213. |
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-timer
added a commit
that referenced
this pull request
Jul 13, 2026
Rollup merge of #159210 - lnicola:sync-from-ra, r=lnicola `rust-analyzer` subtree update Subtree update of `rust-analyzer` to rust-lang/rust-analyzer@ffcdbbd. Created using https://github.com/rust-lang/josh-sync. r? @ghost
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Subtree update of
rust-analyzerto rust-lang/rust-analyzer@ffcdbbd.Created using https://github.com/rust-lang/josh-sync.
r? @ghost