Skip to content
CAI
Software that uses CAICheck a score

rust-lang/rust-analyzer

63.0

Adequate · 28 September 2026

450.7k

lines of production code

Rust

primary language

2

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is a Rust language server and static analysis engine that provides IDE capabilities such as code completion, diagnostics, and refactoring. It functions by parsing Rust source code into an abstract syntax tree, resolving names and types through a trait solver, and interpreting code via a MIR engine for constant evaluation. The system also manages procedural macro expansion and integrates with Cargo projects to deliver real-time feedback and intelligent code assistance.

How it got here

2017–2020 — Infrastructure modernization and parser overhaul

46 changes.

This period focused on establishing robust project governance and introducing foundational libraries like text-size and smol\_str to improve type safety and performance. The core development effort centered on a major parser refactoring to support new Rust syntax features and a migration to a new trait solver, significantly enhancing analysis accuracy. Concurrently, the project expanded its CLI capabilities for diagnostics and profiling while restructuring the IDE layer for better macro resolution and syntax highlighting.

2021–2022 — next-solver migration and IDE refactoring

59 changes.

This period focused on migrating the type inference engine to the new next trait solver and restructuring the macro expansion and name resolution systems for better modularity. Significant work was also done to enhance IDE features, including comprehensive hover details, context-aware completions, and new assists like structural search and replace.

2023–2025 — next-generation trait solver and MIR interpreter

54 changes.

This period focused on integrating rustc's next-generation trait solver and a new MIR interpreter into rust-analyzer to improve type inference accuracy and const-evaluation capabilities. The work involved extensive refactoring of the HIR, syntax, and proc-macro infrastructure to support these new subsystems, alongside significant enhancements to LSP handling, span management, and code completion.

2026 — Protocol and analysis improvements

5 changes.

This period focused on enhancing the proc-macro-srv-cli with robust integration tests and dual transport support for JSON and Postcard protocols. Concurrently, the core analysis engine was refined to better handle macro expansion in documentation attributes and improve closure upvar capture inference.

Features

Add JSON and Postcard transport implementations

The transport layer now includes dedicated modules for JSON and Postcard serialization. The JSON module handles line-delimited messages, ignoring non-JSON stdout output from proc-macros and disabling recursion limits to handle deep syntax trees. The Postcard module implements binary encoding using COBS framing for efficient message passing.

crates/proc-macro-api/src/transport · high confidence

Add Rust 2024 edition support

The edition module now includes Edition2024 as the latest and current supported version, alongside 2015, 2018, and 2021. This enables the tool to recognize and handle code written for the Rust 2024 edition, with specific helper methods available to check if the current edition is at least 2024.

crates/edition · high confidence

Add function and method reference annotation support

The IDE now includes a new module for identifying free functions and methods within a file for annotation purposes. This implementation specifically filters out test functions, ensuring that only production code is highlighted in the editor. The change introduces logic to parse the file, identify function definitions, and return their text ranges, while excluding any functions marked with test-related attributes.

crates/ide/src/annotations · high confidence

Add minimal LSP server example and manual test script

The \lib/lsp-server/examples\ directory now includes a new \minimal\_lsp.rs\ example that demonstrates a basic Language Server Protocol implementation, supporting initialization, document synchronization, completion, hover, definition lookup, and formatting via rustfmt. Alongside this, a \manual\_test.sh\ script has been added to facilitate manual testing by sending a sequence of nine standard LSP JSON-RPC packets to the example server via a named pipe or stdin.

lib/lsp-server/examples · high confidence

Add ungrammar DSL specification and documentation

Introduces the ungrammar domain-specific language for specifying concrete syntax trees. This change adds the core grammar definition file (ungrammar.ungram) which defines the syntax rules for the DSL itself, along with a README.md that provides an introduction, links to the example grammar, and lists editor support plugins for Vim and VSCode.

lib/ungrammar · high confidence

Add ungrammar2json tool

A new command-line utility, ungrammar2json, has been added to convert ungrammar format grammars into JSON. The tool reads a grammar definition from standard input and outputs the corresponding JSON representation to standard output, enabling easier integration with tools that require JSON-based grammar definitions.

lib/ungrammar/ungrammar2json · high confidence

Added documentation and build-time versioning for proc-macro-srv-cli

The proc-macro-srv-cli crate now includes a README.md explaining its role as a standalone binary for procedural macro expansion, specifically highlighting the required \in-rust-tree\ feature for accessing unstable rustc internals. Additionally, a new build script (build.rs) has been added to automatically embed the current git commit hash, short hash, and date into the binary at compile time, enabling version reporting via the \--version\ flag.

crates/proc-macro-srv-cli · high confidence

IDE diagnostics now report specific errors for invalid array patterns, await usage, and destructuring assignments

The IDE now provides precise error reporting for several Rust syntax and type errors that were previously missing or generic. Users will see a hard error (E0730) when attempting to pattern-match on an array with a non-constant length, and an error (E0728) when using \await\ outside of an async context. Additionally, the IDE now flags explicit destructor calls (E0040) with a quickfix to use the \drop\ function, detects duplicate fields in struct literals and patterns (E0062), and prevents the use of functional record update syntax within destructuring assignments. Other new diagnostics include errors for indexing non-indexable types (E0608), dereferencing non-dereferenceable types (E0614), and calling non-callable values (E0618).

crates/ide-diagnostics/src/handlers · high confidence

Initial release of smol\_str library

The smol\_str library is introduced as a new dependency, providing an immutable string type optimized for small strings (up to 23 bytes) and whitespace patterns via stack allocation, with a fixed size of 24 bytes on 64-bit platforms. This release includes the core implementation, documentation, and licensing information (Apache-2.0/MIT).

_lib/smol\str · high confidence

Introduce Structural Search and Replace (SSR) assist

Adds a new Structural Search and Replace capability to the IDE, allowing users to search for code patterns using named wildcards (e.g., \$a\) and replace them with templates. This feature is accessible via the \rust-analyzer.ssr\ command or by writing an SSR rule in a comment (e.g., \// foo($a) ==\>\> ($a).foo($b)\) to trigger an assist. The implementation includes parsing rules, resolving paths in context, matching AST nodes, and applying text edits, with support for constraints like \kind(literal)\ and automatic handling of autoderef/autoref in method calls.

crates/ide-ssr · high confidence

Introduce VFS file watching and loading implementation

Added a new \vfs-notify\ crate that implements the \loader::Handle\ trait using \walkdir\ for directory traversal and \notify\ (specifically \RecommendedWatcher\) for file system events. This component introduces background file watching capabilities, allowing the editor to detect changes in watched directories and files, and provides progress reporting during the initial loading of VFS roots.

crates/vfs-notify · high confidence

Introduce comprehensive hover rendering and test infrastructure

This change establishes the core hover rendering logic in \crates/ide/src/hover/render.rs\ and a robust test suite in \tests.rs\. For users, this means hover tooltips now provide detailed type information, including memory layout details (size, alignment, offset, padding, niches), drop glue status, and specific handling for try expressions and dereferences. The new test infrastructure ensures these behaviors are stable and allows for fine-grained configuration of hover display options like documentation, memory layout, and field/variant limits.

crates/ide/src/hover · high confidence

Introduce configurable assist settings and context

The \ide-assists\ crate now uses a dedicated \AssistConfig\ struct to manage user-facing and internal settings, replacing previous ad-hoc or hardcoded configurations. This config allows controlling import insertion behavior (granularity, prefix kind, grouping), path resolution preferences (prefer no\_std, prelude, or absolute paths), snippet capabilities, term search fuel limits, code action grouping, and expression fill defaults. The \AssistContext\ now holds a reference to this config, enabling assists to respect these settings during application, such as showing rename conflicts or emitting must-use attributes based on the provided configuration.

crates/ide-assists/src · high confidence

Introduce dedicated paths crate for UTF-8 path handling

A new \crates/paths\ library has been added to provide thin wrappers around \camino::Utf8PathBuf\, introducing \AbsPathBuf\ and \AbsPath\ types that guarantee paths are absolute and valid UTF-8. This change centralizes path management, ensuring that internal path representations are consistently UTF-8 encoded and distinguishing between absolute and relative paths to prevent errors related to non-UTF8 characters or incorrect path states.

crates/paths · high confidence

Introduce la-arena library with ArenaMap and IdxRange

The \lib/la-arena\ crate is added, providing an index-based arena implementation. It introduces \ArenaMap\, a map from arena indices to values that supports insertion, removal, and entry-based manipulation, along with \IdxRange\ for representing and iterating over contiguous ranges of allocated indices. This library serves as a foundational data structure for managing indexed collections within the product.

lib/la-arena · high confidence

Introduce line-index library for UTF-8 and wide encoding position mapping

The \lib/line-index\ crate is now available as an external library, providing the \LineIndex\ type to map between flat text offsets and line/column coordinates. It supports both native UTF-8 (\LineCol\) and wide encodings like UTF-16 and UTF-32 (\WideLineCol\), handling multi-byte characters and invalid offsets safely via \try\_line\_col\. The implementation includes optimized calculation paths using SIMD (SSE2 for x86, NEON for aarch64) and exposes methods to convert between offset-based and line-based positions, as well as to retrieve line ranges.

lib/line-index/src · high confidence

Introduce new IDE diagnostics for invalid union patterns and functional record updates

The IDE now reports errors when destructuring assignments use functional record update syntax on non-struct types, and when union patterns contain rest patterns or specify more than one field. These checks help catch invalid pattern matching constructs at edit time.

crates/ide-diagnostics/src · high confidence

Introduce next-solver canonicalization infrastructure

The type inference system now includes a new canonicalization module (\crates/hir-ty/src/next\_solver/infer/canonical\) that enables the new trait solver to safely store and query type information. This change adds the ability to canonicalize query values and responses by replacing inference variables with canonical placeholders, and provides the corresponding instantiation logic to restore these values after query execution. This infrastructure is a prerequisite for the upcoming non-Copy solver types and improved method resolution.

_crates/hir-ty/src/next\solver/infer/canonical · high confidence

Introduce next-trait-solver implementation in hir-ty

The \crates/hir-ty/src/next\_solver\ directory now contains the core implementation of the new trait solver, including foundational modules for type representation (\binder.rs\, \consts.rs\, \generic\_arg.rs\), definition IDs (\def\_id.rs\), type folding (\fold.rs\), and obligation fulfillment (\fulfill.rs\). This change adds the structural components required to replace the existing trait resolution logic with the new solver architecture.

_crates/hir-ty/src/next\solver · high confidence

Introduce standalone LSP server library

The \lib/lsp-server\ crate is now available as a standalone scaffold for building language servers. It provides a synchronous, crossbeam-channel based API for handling LSP protocol handshaking and message parsing, supporting connections over stdio and TCP. The library exposes core types for requests, responses, and notifications, along with error handling for protocol violations and JSON deserialization failures, allowing developers to control the message dispatch loop themselves.

lib/lsp-server/src · high confidence

Introduce standalone proc-macro-srv-cli binary with bidirectional protocol support

A new \proc-macro-srv-cli\ crate provides a standalone binary for the proc-macro server, decoupling it from the main rust-analyzer binary. This binary supports two protocol formats: the existing \json-legacy\ and a new \bidirectional-postcard-prototype\ (defaulting to the latter when configured). The implementation introduces a bidirectional messaging loop that allows the server to handle sub-requests and responses, improving interaction with the client. The binary is gated behind the \in-rust-tree\ feature and includes a \--version\ flag for version reporting.

crates/proc-macro-srv-cli/src · high confidence

Introduce stdx utility crate with type-safe maps, assertions, and process helpers

A new \stdx\ library has been added to provide common utilities for the rust-analyzer codebase. It includes a vendored \anymap\ implementation for type-safe storage of single values per type, recoverable \always!\ and \never!\ assertion macros that log errors instead of panicking in release builds, and a \NamedTempFile\ abstraction that ensures temporary files are deleted on close or process exit across platforms. The crate also adds helpers for streaming child process output without deadlocks, thread management with explicit quality-of-service intents, and various string conversion utilities like \to\_snake\_case\ and \to\_camel\_case\.

crates/stdx/src · high confidence

Introduce term search for intelligent code completion

This change introduces a new term search engine for autocompletion in rust-analyzer. It generates code suggestions by building a type tree of available items (constants, locals, functions, structs, enums) and applying tactics to construct expressions that match the expected type. This allows the IDE to suggest more context-aware completions, such as function calls with correct arguments or struct initializations, rather than just listing available identifiers.

_crates/hir/src/term\search · high confidence

Introduce text-size library for type-safe text offsets and ranges

Added the \text-size\ library, providing \TextSize\ (a 32-bit UTF-8 byte offset) and \TextRange\ (a start/end pair) to replace raw \usize\ usage for text indexing. This new module offers type-safe arithmetic, range manipulation methods (such as \at\, \up\_to\, \contains\), and optional serialization support via the \serde\ feature, aiming to reduce storage requirements and improve API clarity for applications heavily using text ranges.

lib/text-size/src · high confidence

Introduce ungrammar library for parsing concrete syntax tree grammars

The \lib/ungrammar\ crate is now available as a dependency-free Rust library for parsing ungrammar DSL files. It provides a lexer and parser that convert grammar definitions into an in-memory \Grammar\ structure, exposing nodes and tokens via iterators and index access. Error reporting has been implemented to display 1-based line and column indices to align with text editors, and specific validation ensures that leading pipes in production sequences are rejected with clear error messages.

lib/ungrammar/src · high confidence

Introduction of the Rust Un-Grammar specification

The \crates/syntax\ crate now includes \rust.ungram\, a formal grammar file that defines the structure of Rust's concrete syntax tree. This file serves as the source of truth for AST node definitions, specifying non-terminals for paths, generics, macros, and items, which enables the derivation of syntax highlighting rules and AST structures.

crates/syntax · high confidence

New 'Add braces' assist for closures, match arms, and assignments

A new code action, 'Add braces', is now available to wrap unbraced expressions in block expressions. It applies to closure bodies (e.g., \\|n\| n + 1\ becomes \\|n\| { n + 1 }\), match arm expressions (e.g., \1 =\> n + 1\ becomes \1 =\> { n + 1 }\), and assignment bodies (e.g., \let x = n + 1\ becomes \let x = { n + 1 }\). This helps improve code readability or prepare code for further refactoring by explicitly scoping single-expression bodies.

crates/ide-assists/src/handlers · high confidence

New CLI subcommands and improved startup diagnostics

The rust-analyzer binary now exposes several new command-line subcommands for batch analysis, including \diagnostics\, \unresolved-references\, \ssr\ (structural search/replace), \search\, \lsif\, \scip\, \run-tests\, \rustc-tests\, and \prime-caches\. Additionally, the binary now supports a \--wait-dbg\ flag (or \RA\_WAIT\_DBG\ environment variable) to pause startup until a debugger attaches, and improves initial diagnostic reporting by acting as a \RUSTC\_WRAPPER\ to skip full project checks during startup, focusing only on proc-macros and build scripts.

crates/rust-analyzer/src/bin · high confidence

New CLI subcommands for diagnostics, analysis stats, and memory profiling

The rust-analyzer binary now includes a new \cli\ module with several batch-processing subcommands intended for debugging and performance analysis. Users can run \rust-analyzer diagnostics\ to inspect diagnostics, \rust-analyzer analysis-stats\ to view performance metrics, and \rust-analyzer memory-usage\ to profile memory consumption of the analysis host and VFS. Additional commands include \run-tests\, \scip\, \ssr\, \symbols\, and \unresolved-references\, providing programmatic access to various IDE features outside the LSP server context.

crates/rust-analyzer/src · high confidence

New MIR interpreter and lowering engine in hir-ty

The \crates/hir-ty/src/mir\ module now provides a complete MIR interpreter and lowering pipeline, replacing the previous implementation. This change introduces a new \Evaluator\ for const evaluation, a \MirLowerCtx\ for generating polymorphic MIR from HIR bodies, and a \Filler\ for monomorphization. Users benefit from improved const eval capabilities, including support for more intrinsics, better handling of closures and coroutines, and more accurate type inference during constant evaluation.

crates/hir-ty/src/mir · high confidence

New MIR interpreter with intrinsic and lang-item shims

The MIR evaluation subsystem now includes a new shim implementation (shim.rs) that handles intrinsics, \extern "C"\ functions, and language items like \Clone\ and \panic\. This enables the interpreter to execute code that relies on these special functions, such as cloning tuples and closures, and properly handling panics with message extraction. Comprehensive tests (tests.rs) verify this behavior, including execution of \extern "C"\ functions and panic scenarios.

crates/hir-ty/src/mir/eval · high confidence

New active parameter analysis for call arguments

The IDE now provides active parameter analysis, allowing the editor to identify which function parameter a specific call argument corresponds to. This enables features like highlighting the matching parameter in the function signature while the cursor is in an argument position, improving code readability and navigation during function calls.

crates/ide-db/src · high confidence

New cfg crate for conditional compilation analysis

The \crates/cfg\ crate introduces a dedicated library for parsing and evaluating Rust \\#\[cfg\]\ attributes. It provides a \CfgExpr\ representation for configuration predicates, a \CfgOptions\ store for active configuration flags, and a \DnfExpr\ module that converts expressions into Disjunctive Normal Form. This enables advanced introspection capabilities, allowing users to determine why a configuration is inactive (\why\_inactive\) and to receive specific hints on which flags to enable or disable to activate it (\compute\_enable\_hints\).

crates/cfg · high confidence

New completions for Rust attribute arguments

The IDE now provides context-aware completions for the arguments of various Rust attributes. Inside \\#\[cfg(...)\]\, it suggests configuration keys (like \target\_arch\, \target\_os\) with their known values, as well as logical combinators (\all\, \any\, \not\, \false\). For \\#\[derive(...)\]\, it suggests available derive macros and automatically includes required dependencies (e.g., suggesting \Clone\ when deriving \Copy\). Inside \\#\[repr(...)\]\, it suggests valid memory layout options (\align\, \packed\, \C\, \u8\, etc.) while handling mutual exclusions. It also completes keys for \\#\[diagnostic::on\_unimplemented\]\ (like \label\, \message\, \note\), feature flags in \\#\[feature(...)\]\, lint names in \\#\[allow(...)\]\/\\#\[warn(...)\]\/\\#\[deny(...)\]\, and macro names in \\#\[macro\_use(...)\]\.

crates/ide-completion/src/completions/attribute · high confidence

New garbage-collected interning infrastructure with symbol support

The \crates/intern\ module now provides a unified interning system that supports both traditional reference-counted interning and a new garbage-collected (GC) mode. In GC mode, interned values are freed via a mark-and-sweep algorithm rather than immediate deallocation, which can reduce memory pressure during long-running sessions. The module also introduces a \Symbol\ type for efficient string interning, using a tagged pointer representation to support both static and dynamic symbols. Additionally, slice interning is available in GC mode, optimized to use a single allocation with a thin pointer.

crates/intern/src · high confidence

New load-cargo crate for loading Cargo projects into the analysis database

Introduces the \crates/load-cargo\ library, which provides public APIs (\load\_workspace\_at\, \load\_workspace\, \load\_workspace\_into\_db\) to load a Cargo project into a static \RootDatabase\ instance. This enables external tools to run rust-analyzer as a library, supporting configuration for proc-macro servers (sysroot, explicit path, or disabled), build script execution, and VFS integration.

crates/load-cargo · high confidence

New proc-macro crate for deriving TypeFoldable and TypeVisitable traits

A new \crates/macros\ library has been added, providing procedural macros to automatically derive \TypeFoldable\ and \TypeVisitable\ implementations for structs and enums. These macros integrate with the \next\_solver\ infrastructure by binding to \hir\_ty::next\_solver::DbInterner\, allowing fields to be selectively ignored via attributes like \\#\[type\_foldable(identity)\]\ or \\#\[type\_visitable(ignore)\]\.

crates/macros · high confidence

New profiling crate with CPU, memory, and performance counters

The \crates/profile\ module has been introduced to provide comprehensive profiling capabilities for rust-analyzer. It includes a \StopWatch\ that measures elapsed time, memory usage, and CPU instruction counts (on Linux via perf events, configurable via \RA\_DISABLE\_PERF\), and a \CpuSpan\ that integrates with Google's gperftools to generate CPU profiles visualizable with \pprof\. Memory usage is tracked across platforms, supporting jemalloc, Linux (via \mallinfo\/\mallinfo2\), and Windows (via \GetProcessMemoryInfo\).

crates/profile · high confidence

New rust-analyzer CLI subcommands for analysis, diagnostics, and indexing

The rust-analyzer command-line binary now includes several new subcommands: \analysis-stats\ to batch type-check a project and print summary statistics (lines of code, item trees, metrics); \diagnostics\ to scan all modules for errors and exit with a non-zero status if any are found; \prime-caches\ to load a project and run cache priming for benchmarking startup performance; \run-tests\ to execute project unit tests using the MIR interpreter; \lsif\ to generate Language Server Index Format dumps; and \scip\ to emit SCIP symbol indexes. These commands provide dedicated CLI tools for performance profiling, CI validation, and external indexing without requiring an interactive LSP session.

crates/rust-analyzer/src/cli · high confidence

New span crate with stable AST IDs and hygiene tracking

The \crates/span\ crate introduces a new infrastructure for managing code spans, including stable \AstIdMap\ identifiers for items and macro calls to improve incremental analysis stability, and a \SyntaxContext\ system for tracking macro hygiene and expansion hierarchies. It also defines \SpanMap\ for bidirectional range-to-span lookups and \EditionedFileId\ to bundle file identifiers with Rust edition information, providing the foundational types for IDE features like go-to-definition and macro expansion visualization.

crates/span · high confidence

New syntax helper utilities for format strings, name suggestion, and tree diffing

The \ide-db\ crate now includes a new \syntax\_helpers\ module providing core utilities for IDE features. This adds \format\_string.rs\ and \format\_string\_exprs.rs\ to parse and lex format string specifiers and extract expressions for assists and completions. It introduces \suggest\_name.rs\ with a \NameGenerator\ to suggest unique, non-conflicting identifiers for variables and types, handling multi-byte UTF-8 and existing scope names. Additionally, \node\_ext.rs\ provides helpers for walking expression and pattern trees, and \tree\_diff.rs\ offers a \diff\ function to compute minimal text edits between syntax trees.

_crates/ide-db/src/syntax\helpers · high confidence

New syntax highlighting for escape sequences and format specifiers

The IDE now provides dedicated syntax highlighting for escape sequences within string, char, and byte literals, distinguishing valid escapes from invalid ones with a specific error style. Additionally, format specifiers inside format macro strings (like \println!\) are now highlighted, allowing users to visually identify placeholders and formatting syntax within their code.

_crates/ide/src/syntax\highlighting · high confidence

New test-fixture crate for Rust analyzer tests

A new \crates/test-fixture\ crate has been introduced to provide high-level utility methods for setting up test databases from fixture strings. This allows tests for rust-analyzer to be written without depending on the entire sysroot, using a structured syntax to define files, crates, dependencies, editions, and configuration options.

crates/test-fixture · high confidence

Parser now supports new Rust syntax features including const/async blocks, gen blocks, and c-strings

The parser in \crates/parser/src/grammar/expressions/atom.rs\ has been updated to recognize and parse several new Rust language constructs. Users can now write const blocks (\const { ... }\), async blocks (\async { ... }\), and generator blocks (\gen { ... }\, \async gen { ... }\, \gen move { ... }\, \async gen move { ... }\). The parser also supports the \become\ expression for tail calls, the \yield\ keyword, the \do yeet\ expression, and C-string literals (\`c

crates/parser/src/grammar/expressions · high confidence

Postfix completions for format-like string macros

When completing a string literal, users can now use postfix triggers to expand the string into various format macros. Typing \format\, \panic\, \println\, \eprintln\, or log-level variants (\logd\, \logt\, \logi\, \logw\, \loge\) after a string literal will generate the corresponding macro call (e.g., \format!(...)\, \log::info!(...)\), automatically extracting expressions from format placeholders like \{}\ or \{ident}\ as arguments. The implementation also ensures that special characters like \$\ and \ \ in the original string are properly escaped in the generated snippet to prevent syntax errors.

crates/ide-completion/src/completions/postfix · high confidence

Smart Enter key handling for comments and brace-delimited blocks

The IDE now provides intelligent behavior for the Enter key. When typing inside single-line comments (// or ///), pressing Enter automatically continues the comment prefix on the new line, including handling trailing whitespace cleanup. Inside brace-delimited constructs (like function bodies or blocks), pressing Enter after the opening brace reformats the content by moving it to a new indented line, improving code readability.

crates/ide/src/typing · high confidence

SmolStr gains serialization, debugging, and no\_std support

The \SmolStr\ library now includes built-in support for \serde\ and \borsh\ serialization, allowing instances to be easily encoded and decoded in various formats. A GDB pretty-printer has been added to improve debugging visibility for \SmolStr\ values in native environments. Additionally, the crate now supports \no\_std\ environments, making it suitable for embedded or kernel-level applications, and introduces several new API methods such as \is\_heap\_allocated\, \from\_static\, and \is\_empty\ to enhance usability and performance.

_lib/smol\str/src · high confidence

Support for SIMD intrinsics in the MIR interpreter

The MIR interpreter now supports executing SIMD (Single Instruction, Multiple Data) intrinsics, including bitwise operations (and, or, xor), comparisons (eq, ne, lt, le, gt, ge), bitmask generation, and shuffling. This enables correct evaluation of code using these vectorized operations during static analysis and const-evaluation.

crates/hir-ty/src/mir/eval/shim · high confidence

Architecture

Completion context analysis logic is extracted into a dedicated module

The logic for analyzing the code surrounding the cursor to determine completion context has been moved from the main context module into a new, dedicated \analysis.rs\ file within \crates/ide-completion/src/context\. This refactoring separates the complex macro expansion and semantic analysis routines from the context data structures, improving code organization and maintainability without changing the user-facing completion behavior.

crates/ide-completion/src/context · high confidence

Completion engine restructured into modular subsystems

The completion engine has been reorganized into distinct modules for configuration, context analysis, item construction, and rendering. This change introduces a new \CompletionConfig\ structure to centralize settings such as postfix completions, auto-imports, and snippet capabilities, while splitting the context analysis into dedicated modules for precise location handling. The item system now uses a builder pattern for constructing completion entries, and rendering logic is modularized to handle specific types like functions, literals, and macros separately, improving maintainability and allowing for more granular control over completion behavior.

crates/ide-completion/src · high confidence

Expression store refactored into dedicated module with new Body and Path types

The expression store logic has been reorganized into a new \crates/hir-def/src/expr\_store\ module, introducing a dedicated \Body\ struct that wraps the \ExpressionStore\ and explicitly tracks function parameters (including a distinction between formal and user-written bindings for coroutines) and self-parameters. This change also introduces a new \Path\ representation that optimizes memory usage by distinguishing between simple bare paths and those with generics or type anchors, alongside new modules for macro expansion (\expander.rs\), lowering (\lower.rs\), and pretty-printing (\pretty.rs\).

_crates/hir-def/src/expr\store · high confidence

Inlay hints implementation split into modular components

The inlay hints logic in the IDE has been reorganized into separate modules (adjustment, bind\_pat, binding\_mode, bounds, chaining, closing\_brace, closure\_captures, closure\_ret, discriminant, extern\_block, generic\_param, etc.), each handling a specific hint type. This refactoring improves code maintainability and allows for more targeted configuration and testing of individual hint features without affecting the entire inlay hint system.

_crates/ide/src/inlay\hints · high confidence

Parser grammar refactored into modular sub-files

The parser's grammar logic has been reorganized from a single monolithic file into distinct modules (attributes, expressions, generic\_args, generic\_params, items, params, paths, patterns, types). This structural change improves code maintainability and readability without altering the parsing behavior or syntax tree output for users.

crates/parser/src/grammar · high confidence

Refactor completion rendering into dedicated modules

The completion rendering logic in \ide-completion\ has been reorganized from a single file into separate modules for each completion kind (const, function, literal, macro, pattern, type alias, union, and shared variant helpers). This change improves code maintainability and clarity without altering the user-facing completion behavior.

crates/ide-completion/src/render · high confidence

Refactored LSP request and notification handling into dedicated modules

The LSP request and notification handlers in \crates/rust-analyzer/src/handlers\ have been reorganized into three distinct modules: \dispatch.rs\, \request.rs\, and \notification.rs\. This change introduces a \RequestDispatcher\ in \dispatch.rs\ to centralize routing logic for LSP requests, separating synchronous, asynchronous, and mutable-state operations. The actual handler implementations for requests (such as workspace reload, analyzer status, and code actions) are now located in \request.rs\, while notification handlers (such as document open, change, close, and save) are in \notification.rs\. This structural change improves code maintainability and separation of concerns within the rust-analyzer server.

crates/rust-analyzer/src/handlers · high confidence

Refactored project-model into modular source files

The project-model crate has been reorganized from a single large file into a modular structure, introducing dedicated modules for build dependencies, Cargo configuration file parsing, workspace representation, environment variable injection, manifest path handling, and sysroot management. This refactoring improves code maintainability and separation of concerns without changing the external API or user-facing behavior.

crates/project-model/src · high confidence

Restructured macro expansion internals into dedicated modules

The \hir-expand\ crate has been reorganized to improve code clarity and maintainability. Attribute handling logic has been moved into a new \attrs.rs\ module, while \cfg\ processing for derive macros is now isolated in \cfg\_process.rs\. Builtin macro implementations are split into \builtin.rs\ with submodules for attribute, derive, and function-like macros. Declarative macro expansion is handled by \declarative.rs\, eager expansion by \eager.rs\, and file/span mapping by \files.rs\. Syntax fixups for incomplete code are now in \fixup.rs\, hygiene machinery in \hygiene.rs\, and inert attribute macros in \inert\_attr\_macro.rs\. Database change tracking is now in \change.rs\. This refactoring separates concerns within the macro expansion system without changing user-facing behavior.

crates/hir-expand/src · high confidence

Restructured name resolution into modular components

The name resolution logic in \hir-def\ has been refactored from a monolithic structure into distinct modules (\assoc.rs\, \attr\_resolution.rs\, \collector.rs\, \diagnostics.rs\, \mod\_resolution.rs\, \path\_resolution.rs\, \proc\_macro.rs\). This change improves code organization and maintainability by separating concerns such as associated item collection, attribute macro resolution, and path resolution into their own files, without altering the external behavior of the name resolution system.

crates/hir-def/src/nameres · high confidence

Behavioural changes

12 commits (0 fixes) modifying bench\_data

A change to existing behaviour in bench\_data — 12 commits, 2 files.

_bench\data · medium confidence · unverified

Automatic migration of deprecated rust-analyzer configuration keys

The configuration system now automatically detects and migrates outdated JSON settings to their new equivalents, ensuring that user preferences are preserved during upgrades. This patch handles structural changes that simple aliases cannot cover, such as renaming \checkOnSave\ to \check\, converting \primeCaches\ to \cachePriming\, and consolidating \hoverActions\ settings into \hover.actions\. It also intelligently merges legacy boolean flags like \addCallArgumentSnippets\ and \addCallParenthesis\ into the new \completion.callable.snippets\ structure, and migrates \callInfo/full\ to \signatureInfo\ settings, preventing configuration errors when loading older config files.

crates/rust-analyzer/src/config · high confidence

Build-time version string generation

The rust-analyzer build process now automatically constructs a version string at compile time by extracting the commit hash, short hash, and date from the local Git repository. This ensures that the binary's reported version accurately reflects the specific source code revision and build date, replacing any previous static or manually managed versioning logic.

crates/rust-analyzer · high confidence

Builtin macros and derives are now implemented in dedicated modules with a new quote macro

The implementation of Rust's built-in macros and derive attributes has been reorganized into dedicated modules (\attr\_macro.rs\, \derive\_macro.rs\, \fn\_macro.rs\, and \quote.rs\). This change introduces a new internal \quote\ macro for generating token trees, which is now used by the builtin macro expanders. The \derive\_macro.rs\ module now explicitly supports the \CoercePointee\, \Reborrow\, and \CoerceShared\ derive traits, in addition to the standard set like \Copy\, \Clone\, and \Debug\. Attribute macros such as \\#\[test\]\, \\#\[bench\]\, and \\#\[test\_case\]\ are now gated under \cfg(test)\ during expansion, and the \\#\[derive\]\ attribute is expanded into a pseudo-attribute form to aid IDE resolution without duplicating the item's token tree.

crates/hir-expand/src/builtin · high confidence

Completion logic restructured into modular sub-modules

The completion logic in \crates/ide-completion/src/completions\ has been reorganized from a monolithic structure into distinct, context-specific modules (such as \attribute.rs\, \dot.rs\, \env\_vars.rs\, \expr.rs\, \extern\_abi.rs\, \extern\_crate.rs\, \field.rs\, \flyimport.rs\, \fn\_param.rs\, and \format\_string.rs\). This change improves code maintainability and clarity by separating concerns for different completion scenarios, such as attribute inputs, dot-access fields and methods, Cargo environment variables, expression paths, extern ABI strings, extern crate imports, field visibility, flyimport, function parameters, and format string identifiers.

crates/ide-completion/src/completions · high confidence

Consolidated xtask code generation and release infrastructure

The xtask build tooling has been restructured to centralize code generation and release workflows. The \codegen\ command now orchestrates the generation of grammar-based AST nodes and tokens, assist documentation tests, diagnostics documentation, feature documentation, and lint definitions from a single entry point. Release and distribution processes have been updated to support PGO (Profile-Guided Optimization) training, configurable memory allocators (mimalloc, jemalloc), and platform-specific artifact packaging (ZIP for Windows, GZIP for others).

xtask · high confidence

Disallow inner attributes on block expressions in most contexts

The syntax validator now rejects inner attributes (e.g., \\#\[allow(...)\]\) placed on block expressions (\{ ... }\) unless the block appears in specific allowed contexts such as function bodies, statement lists, loops, or as part of tuple, array, or argument list expressions. Previously, such attributes were accepted in other positions, leading to false positives or inconsistent behavior; this change ensures that inner attributes are only permitted where semantically valid, improving diagnostic accuracy for users writing code with block-level attributes.

crates/syntax/src/validation · high confidence

Establishes repository governance, coding standards, and contributor guidelines

The project now enforces a structured development environment and contributor policy. Coding standards are defined via \.editorconfig\ (UTF-8, LF line endings, 4-space indentation) and \rustfmt.toml\ (Edition 2024, module reordering), while \clippy.toml\ restricts standard library hash maps in favor of \FxHashMap\ and mandates a specific command builder for spawned processes to ensure correct working directories. Contributor workflows are formalized through \CONTRIBUTING.md\, which highlights a feature freeze on IDE assists, and \AI\_POLICY.md\, which restricts autonomous AI usage and requires human oversight for code contributions, particularly for analysis crates. Additional infrastructure includes \triagebot.toml\ for automated PR labeling and merge checks, \josh-sync.toml\ for subtree synchronization, and \AGENTS.md\ to guide AI coding assistants.

(repo-wide) · high confidence

Expanded lexer error diagnostics for literals and comments

The lexer now provides more specific error messages for invalid or incomplete literals, including byte/char/string literals, C-strings, and integer base prefixes. Users will see distinct errors for issues like missing digits after base prefixes (e.g., \0x\), empty character literals, unknown byte escapes, and invalid unicode escapes. Additionally, unclosed literals (byte, char, string, raw string) and block comments now explicitly report the missing terminating symbols, and incomplete frontmatter with unicode characters is flagged as an error.

_crates/parser/test\data/lexer/err · high confidence

Expanded semantic highlighting for Rust syntax elements

The IDE's syntax highlighting now provides more granular and semantically accurate coloring for Rust code. This update introduces new highlighting modifiers for \const\ items and parameters, distinguishes between functions and methods (including \static\ vs \reference\ semantics), and adds specific styles for \unsafe\ blocks, \async\ functions, and \extern crate\ declarations. It also enhances highlighting for inline assembly (\asm!\), attributes (including derive helpers and proc-macros), crate roots, and the standard library, while fixing previous issues with escape sequences and format string specifiers.

_crates/ide/src/syntax\_highlighting/test\data · high confidence

Expose rustc version for sysroot ABI selection

The proc-macro-srv build script now captures the rustc version at build time and exposes it via the RUSTC\_VERSION environment variable, enabling the server to select the correct sysroot ABI based on the compiler version used to build it.

crates/proc-macro-srv · high confidence

Flat serialization format for proc-macro token trees

The legacy protocol for proc-macro-srv now uses a flat, array-based JSON representation for token trees instead of recursive nested structures. This change prevents JSON parser stack overflows on deeply nested code and improves serialization performance by storing subtrees, literals, punctuations, and identifiers in separate flat arrays with index-based references. The format includes version checks to support extended leaf data (literal kinds, ident rawness) and close span encoding, ensuring compatibility with different server versions while maintaining the same logical token tree structure for the IDE.

_crates/proc-macro-api/src/legacy\protocol/msg · high confidence

HIR refactoring: new module structure and format\_args support

The \hir-def\ crate has been reorganized to move HIR definitions into a new \hir\ sub-module, introducing dedicated files for type references (\type\_ref.rs\), generic parameters (\generics.rs\), and format arguments (\format\_args.rs\). This change introduces a new \FormatArgs\ structure that parses \format\_args!\ macro inputs using an upstream fork of \rustc\_parse\_format\, enabling support for implicit captures and detailed format specifier validation. Additionally, generic parameter handling has been updated to distinguish between early and late bound lifetimes, and the \TypeRef\ and \WherePredicate\ types have been optimized for size and structure to improve internal performance.

crates/hir-def/src/hir · medium confidence

Hide type inlay hints for closures and constructors

The IDE now automatically hides type inlay hints for closure return types and constructor calls (such as struct instantiation and enum variants) by default. This reduces visual clutter in code where the type is often obvious from the context, though the behavior can be adjusted via configuration settings.

crates/ide/src · high confidence

Improved case-conversion diagnostics for non-ASCII identifiers

The diagnostic system for identifier naming conventions (e.g., suggesting \lower\_snake\_case\ or \UpperCamelCase\) now correctly handles non-ASCII characters. Previously, identifiers containing non-ASCII letters might have been ignored or handled incorrectly by the case-detection logic; the new implementation in \case\_conv.rs\ delegates to \stdx\ utilities that properly recognize case in Unicode characters, ensuring accurate suggestions for global codebases.

_crates/hir-ty/src/diagnostics/decl\check · high confidence

Improved closure upvar capture analysis

The closure analysis module now uses a dedicated \ExprUseVisitor\ to determine how expressions are used, enabling more accurate inference of upvar captures. This change refactors how the type system tracks memory locations and projections (such as dereferences, field accesses, and indexing) within closures, ensuring that capture modes are correctly inferred based on actual usage patterns rather than generic signature inference.

crates/hir-ty/src/infer/closure/analysis · medium confidence

Improved closure upvar capture analysis

The closure type inference module now includes a detailed analysis of upvar captures, determining the specific borrow kind (immutable, unique immutable, or mutable) required for each variable captured by a closure. This change ensures that the compiler correctly escalates borrow requirements based on how upvars are used (e.g., promoting an immutable borrow to mutable if the variable is assigned to), leading to more accurate type checking and error reporting for closures that capture and mutate environment variables.

crates/hir-ty/src/infer/closure · high confidence

Improved code generation for trait implementations and destructuring

The IDE assists now generate more accurate default bodies for standard traits like Clone, Debug, Default, Hash, PartialEq, and PartialOrd by using a new syntax factory, ensuring correct AST node types and handling fallback cases for generated PartialEq implementations. Additionally, a new utility for handling field expressions during destructuring ensures that references and parentheses are correctly applied when converting field accesses to path expressions, preventing syntax errors in generated code.

crates/ide-assists/src/utils · high confidence

Improved diagnostics mapping for macros and non-BMP characters

The diagnostics module now provides more accurate error locations for code inside macros by skipping dummy macro files and preferring spans within the current workspace. It also fixes incorrect position mapping for non-BMP (wide) Unicode characters, ensuring that diagnostic ranges and quick-fixes align correctly with the actual text in the editor.

crates/rust-analyzer/src/diagnostics · high confidence

Improved import insertion respects configuration and code structure

The import insertion logic in the IDE database now more accurately respects \\#\[cfg\]\ attributes, ensuring imports are placed within the correct conditional compilation blocks or at the module level depending on the context. It also handles edge cases such as inserting imports before doc comments and after trailing comments in inline modules, and properly orders raw identifiers when merging use trees. Additionally, the system now supports a 'one' import granularity and allows users to configure whether imports are grouped, ensuring the resulting code structure aligns with the 2024 edition style and user preferences.

_crates/ide-db/src/imports/insert\use · medium confidence

The IDE now provides more robust handling of Rust documentation links. Intra-doc links can now resolve to struct fields and associated items, and the parser correctly interprets namespace prefixes (like \struct\, \fn@\, or \macro!\) to disambiguate targets. Additionally, external documentation links are generated more accurately for built-in types, standard library crates, and user-defined structs, with proper support for both web URLs and local file paths.

_crates/ide/src/doc\links · high confidence

Improved parser error recovery for malformed Rust syntax

The parser now handles a wider variety of malformed Rust code more gracefully, providing structured error nodes instead of failing completely. This update adds specific test cases and error recovery logic for scenarios such as missing semicolons in async blocks, empty generic argument lists, missing function parameter types, and invalid attribute syntax. Users will see more precise error messages and better context preservation when writing incomplete or incorrect code, particularly in areas like function signatures, generic parameters, and macro invocations.

_crates/parser/test\data/parser/inline/err · high confidence

Improved toolchain information discovery for Rust projects

The toolchain info module now provides more accurate and robust detection of the Rust toolchain's configuration. It fetches built-in \cfg\ flags (including previously unstable atomic and thread-local attributes) via \rustc --print cfg\, retrieves target architecture and data layout using \rustc --print target-spec-json\, and discovers the build target tuple from Cargo configuration files or \rustc -vV\. Additionally, toolchain version parsing has been aligned with these queries, and command execution now enforces a current directory to ensure reliable output.

_crates/project-model/src/toolchain\info · high confidence

Incremental reparsing now respects Rust edition settings

The incremental reparsing logic in the syntax crate has been updated to accept and propagate the Rust edition parameter through all parsing and lexing steps. This ensures that edition-specific features, such as C-string literals and contextual keywords, are correctly handled during incremental edits, preventing parsing errors or incorrect tokenization when editing code that relies on specific language versions.

crates/syntax/src/parsing · high confidence

Introduce SyntaxFactory for AST node generation with syntax mappings

A new \SyntaxFactory\ component has been added to the syntax crate to replace the previous \make\ module for generating AST nodes. This factory provides constructor methods for various AST elements (such as structs, paths, and types) and integrates with \SyntaxMappingBuilder\ to automatically track source-to-generated node mappings. This change enables more precise syntax editing and refactoring capabilities by ensuring that generated nodes are correctly linked to their input sources, facilitating smoother in-place edits and assist migrations.

_crates/syntax/src/ast/syntax\factory · high confidence

Introduce edition-aware file IDs and transactional database changes

The \base-db\ crate now uses \EditionedFileId\ to track the Rust edition of each file, ensuring that parsing and analysis respect edition-specific semantics. Additionally, a new \FileChange\ struct provides a transactional API for applying updates to the database, allowing source roots, file contents, and the crate graph to be modified in a single atomic operation with configurable durability levels.

crates/base-db · high confidence

Introduces a new symbol interning infrastructure for improved performance

This change adds a new symbol interning implementation in \crates/intern/src/symbol/symbols.rs\, replacing the previous static predefined symbols with a dynamic, hash-based interning system using \DashMap\. This new infrastructure pre-fills a map with common symbols (such as keywords like \fn\, \let\, \self\, and various ABI names like \C-cmse-nonsecure-entry\) and supports integer-based symbol generation (e.g., \0\ through \255\ and generated names like \\<ra@gennew\>0\). For users, this results in faster symbol lookups and reduced memory overhead during analysis, as symbol equality is now handled via pointer comparison of interned strings rather than string content comparison, and common symbols are cached in a thread-safe concurrent map.

crates/intern/src/symbol · high confidence

Introduces bidirectional postcard protocol for proc-macro server communication

The \proc-macro-api\ crate now supports a new bidirectional communication protocol using the \postcard\ serialization format, alongside the existing JSON-based legacy protocol. This change introduces a \ProtocolFormat\ enum to distinguish between \JsonLegacy\ and \BidirectionalPostcardPrototype\, allowing the client to negotiate the protocol version with the server. The new protocol enables sub-requests and sub-responses, improving interaction flexibility, while maintaining backward compatibility by falling back to the legacy JSON protocol if the server does not support the new format or if the \RUST\_ANALYZER\_USE\_POSTCARD\ environment variable is not set. This shift aims to enhance performance and robustness in proc-macro expansion by leveraging a more efficient binary serialization method.

crates/proc-macro-api/src · high confidence

Introduces bidirectional protocol for proc-macro server communication

The proc-macro API now supports a new bidirectional messaging protocol, allowing the server to send asynchronous sub-requests and responses (such as file paths, source text, line/column info, and span details) back to the client during macro expansion. This replaces the previous unidirectional model, enabling richer interactions like retrieving local file paths and canceling operations, which improves the accuracy of diagnostics and error reporting for users.

_crates/proc-macro-api/src/bidirectional\protocol · high confidence

LSP server capabilities and extension definitions are restructured

The LSP layer now explicitly advertises server capabilities (such as completion, inlay hints, and semantic tokens) based on client support and configuration, and defines a comprehensive set of custom \rust-analyzer\ extension requests (like \viewSyntaxTree\, \viewHir\, and \runnables\) along with conversion utilities for protocol types.

crates/rust-analyzer/src/lsp · high confidence

Legacy proc-macro protocol messages and serialization logic

The \legacy\_protocol\ module now explicitly defines the message structures (Request and Response enums) and serialization traits (Message) used for cross-process communication with the proc-macro server. This includes support for API version checks, macro listing, and macro expansion, with specific handling for span data modes (Id vs. RustAnalyzer) and extended span data in expansion results. The implementation uses JSON for wire protocol encoding/decoding within this legacy context.

_crates/proc-macro-api/src/legacy\protocol · high confidence

Library renamed to text-size with API updates and new ordering method

The library has been renamed from \text\_unit\ to \text-size\. This release introduces a new \TextRange::ordering\ method and updates the public API to align with the new naming convention, including renaming \TextUnit\ to \TextSize\ and adjusting constructor and method signatures (e.g., \TextRange::from\_to\ becomes \TextRange::new\).

lib/text-size · high confidence

Migrate to the next trait solver

The HIR layer now uses the new trait solver for type inference and trait resolution, replacing the previous Chalk-based implementation. This change improves the accuracy of type checking, particularly for complex generic bounds and associated types, and aligns rust-analyzer's behavior more closely with the official Rust compiler.

crates/hir/src · high confidence

Migrate type inference and trait solving to the next trait solver

The type-checking engine in \hir-ty\ has been migrated from the legacy Chalk-based solver to the new 'next-solver'. This change introduces new modules for autoderef, builtin derive implementations, and constant evaluation that are built on the new solver's types and traits, resulting in more accurate type inference, improved method resolution, and better handling of complex trait bounds and associated types.

crates/hir-ty/src · high confidence

Migrate type inference to the next-generation trait solver

The type inference engine in \crates/hir-ty\ has been replaced with a new implementation (\next\_solver/infer\) that aligns with rustc's next-generation trait solver. This change introduces a new \InferCtxt\ architecture, including dedicated modules for handling inference contexts, type variable storage, unification keys, and trait obligation selection. It also adds new error handling structures (\FulfillmentError\, \SelectionError\) and diagnostic tracing capabilities to improve the accuracy and performance of type checking and error reporting.

_crates/hir-ty/src/next\solver/infer · high confidence

New AST editing and construction APIs

The \crates/syntax/src/ast\ module introduces a new \SyntaxEditor\ for mutable syntax tree modifications, replacing the previous immutable-only editing approach. This includes a new \AstNodeEdit\ trait for indenting and dedenting nodes, and an \AttrsOwnerEdit\ trait for removing attributes and documentation. A new \SyntaxFactory\ and \quote!\-like macro in \ast::make\ provide a structured way to construct AST nodes with optional syntax mappings. Additionally, precedence handling for expressions has been moved into the syntax crate, and various extension methods for AST nodes (like \IfExpr\, \PrefixExpr\, and \BinExpr\) have been added or refined to support these new editing capabilities.

crates/syntax/src/ast · high confidence

New MIR lowering infrastructure for places and patterns

The MIR lowering logic in \crates/hir-ty/src/mir/lower\ has been restructured into dedicated modules (\as\_place.rs\ and \pattern\_matching.rs\) to handle expression-to-place conversion and pattern matching separately. This change introduces support for overloaded deref operations, allowing \Deref\ and \DerefMut\ traits to be resolved during lowering, and implements a two-phase pattern matching process (check then bind) to correctly handle move semantics in complex patterns like tuple or-or matches. These changes improve the accuracy of MIR generation for destructuring and dereferencing operations.

crates/hir-ty/src/mir/lower · high confidence

New VFS architecture with file sets and anchored paths

The virtual file system has been restructured to introduce \FileSet\ and \FileSetConfig\, allowing the VFS to partition files into disjoint sets based on path prefixes. This enables more granular change tracking and module resolution. Additionally, a new \AnchoredPath\ representation is added to handle relative paths relative to a specific file anchor, ensuring correct path resolution across different file system universes (e.g., virtual paths vs. real paths). The \Vfs\ now uses a \PathInterner\ to map paths to compact \FileId\s, and the \loader\ module provides a configurable interface for file watching and loading with progress reporting.

crates/vfs · high confidence

New diagnostics for naming conventions, unsafe operations, and pattern exhaustiveness

The \hir-ty\ diagnostics module has been restructured into dedicated files (\decl\_check.rs\, \expr.rs\, \match\_check.rs\, \unsafe\_check.rs\) to provide more granular and accurate error reporting. Users will now see specific diagnostics for incorrect naming conventions (e.g., snake\_case vs. camel\_case) for variables, structs, enums, and functions; improved checks for missing \unsafe\ blocks and deprecated safe calls; and detailed warnings for non-exhaustive match patterns and missing struct fields. This change consolidates previously scattered validation logic into a unified, solver-aware diagnostic system.

crates/hir-ty/src/diagnostics · high confidence

New diagnostics for path and type lowering errors

The type-lowering subsystem now emits structured diagnostics for path resolution and generic argument issues. Users will see specific errors when generic arguments are prohibited in certain contexts (such as on modules, primitives, or enum variants), when generic argument counts or kinds mismatch expectations, or when lifetime elision fails. Additionally, a new diagnostic is emitted when type inference variables are used in contexts where inference is not allowed.

crates/hir-ty/src/lower · high confidence

New modular lowering infrastructure for inline assembly, format\_args, generics, and paths

The expression store lowering logic in \crates/hir-def/src/expr\_store/lower\ has been reorganized into dedicated modules (\asm.rs\, \format\_args.rs\, \generics.rs\, \path.rs\) to handle specific syntax constructs. This change introduces proper lowering support for inline assembly (\asm!\), including operands, clobber abis, and options, while also refining the lowering of \format\_args!()\ macros to correctly parse templates and arguments. Additionally, generic parameter handling (type, const, and lifetime bounds) and path resolution (including hygiene and macro expansion) are now managed in their own focused files, improving maintainability and separation of concerns within the HIR definition layer.

_crates/hir-def/src/expr\store/lower · high confidence

New syntax tree editing and algorithmic utilities

The \crates/syntax\ crate now includes a new \SyntaxEditor\ for non-destructive, immutable syntax tree modifications, replacing the previous \SyntaxRewriter\ and \ted\ APIs. This change introduces typed construction methods (e.g., \with\_ast\_node\) and supports insertion, deletion, and replacement of syntax elements while preserving mappings. Additionally, a new \algo\ module provides utility functions for tree traversal, such as finding nodes at offsets, skipping trivia, and computing least common ancestors, alongside a new \fuzz\ module for parser and reparse testing.

crates/syntax/src · high confidence

New token tree iteration and storage infrastructure

The \tt\ crate now provides a new stateful \Cursor\ for efficient iteration over token trees and a \TtIter\ parser helper for declarative macro definitions. Internally, token trees are stored in a contiguous, variable-length encoded byte buffer with compressed span parts to significantly reduce memory usage, replacing the previous tree-based storage model.

crates/tt · high confidence

New type layout computation engine in hir-ty

The \crates/hir-ty/src/layout\ module now provides a complete, standalone implementation for computing the binary layout of Rust types (structs, unions, enums, and expressions). This replaces previous scattered logic with a dedicated query system (\layout\_of\_adt\_query\, \target\_data\_layout\_query\) that leverages \rustc\_abi\ for accurate size, alignment, and discriminant handling, including support for complex attributes like \\#\[repr\]\ and niche optimizations. Users benefit from more reliable type layout calculations in IDE features such as hover, diagnostics, and const evaluation, ensuring that the analyzer's understanding of memory layout matches the compiler's.

crates/hir-ty/src/layout · high confidence

Parser refactored to use a Struct-of-Arrays token input and event-based output

The parser in \crates/parser/src\ has been restructured to decouple token consumption from tree construction. It now accepts a Struct-of-Arrays \Input\ (containing parallel vectors for token kinds, jointness, contextual keywords, and editions) and produces a flat stream of \Event\s that are processed into an \Output\ tree. This change introduces new modules for handling these events (\event.rs\), the token input (\input.rs\), and the output traversal (\output.rs\), while also adding dedicated support for parsing frontmatter (\frontmatter.rs\) and providing granular prefix and top-level entry points (\grammar.rs\).

crates/parser/src · high confidence

Parser updates for new Rust syntax features

The parser now supports several new Rust language constructs: tuple struct fields can be marked with \pub\, enum variants can be unnamed (using \\_\), and record fields can be marked \unsafe\ or include \mut\ restrictions (e.g., \mut(super)\). Struct fields can now have default values (e.g., \f: i32 = 0\). \const\ items can now have generic parameters and where clauses, while \static\ items are correctly restricted from generics. \impl\ blocks can now be \const\ or implement the never type (\!Trait\). Trait aliases (\trait Z = T;\) are parsed as a distinct form, and \use\ statement error recovery has been improved.

crates/parser/src/grammar/items · high confidence

Proc-macro expansion now uses rustc's proc-macro bridge

The proc-macro server's dynamic library implementation has been refactored to use the \rustc\_proc\_macro::bridge\ for executing macro expansions. This change replaces the previous internal mechanism with rustc's standard bridge, handling custom derives, bang macros, and attribute macros through the new client interface. Additionally, panic messages from macro execution are now converted to strings using the bridge's \into\_string\ method, ensuring consistent error reporting.

crates/proc-macro-srv/src/dylib · high confidence

Proc-macro server now runs expansions in a separate thread

The proc-macro server in \crates/proc-macro-srv\ has been restructured to execute macro expansions in a dedicated thread with an 8MB stack. This change isolates thread-local state (such as the symbol interner) from the main thread, preventing memory leaks and accumulation of thread-local allocations during repeated macro expansions. The server implementation now manages this threading via \thread::scope\ and handles panics or cancellations from the expander thread gracefully, returning specific error variants rather than crashing the server.

crates/proc-macro-srv/src · high confidence

Proc-macro server now supports two span backends: Rust-Analyzer internal spans and legacy SpanIds

The proc-macro server implementation has been refactored to support two distinct span backends via the \server\_impl\ module. The new \RaSpanServer\ backend uses rust-analyzer's internal \Span\ representation, enabling richer span features such as source text retrieval, parent/source span resolution, and byte-range calculations for users of rust-analyzer. The legacy \SpanIdServer\ backend remains available for compatibility with older clients (like RustRover), but provides limited span information (e.g., empty file paths, default line/column 1). This change allows the server to adapt its behavior based on the client's capabilities while maintaining backward compatibility.

_crates/proc-macro-srv/src/server\impl · high confidence

Proc-macro-test build script updated to support new Cargo package ID specification

The build script for the proc-macro-test crate now uses Cargo's new package ID specification (via \cargo pkgid\) to identify the compiled proc-macro artifact, while maintaining backward compatibility with the old format. This ensures correct artifact detection regardless of which package ID format the underlying Cargo version uses, preventing build failures when the package ID representation changes.

crates/proc-macro-srv/proc-macro-test · high confidence

QoS-aware thread pool with intent-based scheduling

The \stdx\ thread module now includes a custom thread pool that schedules tasks based on a new \ThreadIntent\ abstraction. This intent maps to platform-specific Quality of Service (QoS) classes on Apple systems, allowing the application to prioritize latency-sensitive work (like syntax highlighting) over background worker tasks. The pool ensures that threads dynamically adjust their QoS class to match the intent of the task being executed, improving responsiveness for user-facing operations while keeping background maintenance tasks efficient.

crates/stdx/src/thread · high confidence

Redesigned attribute handling and builtin derive support

The attribute system in \hir-def\ has been refactored to use a compact \AttrFlags\ bitfield for presence checks, deferring expensive parsing until necessary to improve performance. This change introduces new modules for handling attributes (\attrs.rs\), builtin derive implementations (\builtin\_derive.rs\), and builtin types (\builtin\_type.rs\). Additionally, a new \DynMap\ container is added to store heterogeneous maps for various AST node IDs, and the expression store is restructured into \ExpressionStore\ to separate type and expression data.

crates/hir-def/src · high confidence

Redesigned item tree attribute handling and lowering

The item tree module has been refactored to improve how attributes and configuration are processed. A new \attrs.rs\ module introduces \AttrsOrCfg\ to correctly handle \cfg\-disabled attributes, ensuring that attributes following a disabled \cfg\ are preserved for crate-level processing while skipping unnecessary data like doc comments to save memory. The \lower.rs\ module now uses a \Ctx\ struct to manage the lowering of AST items into the item tree, integrating with the new span map system for better hygiene and error reporting. Additionally, a \pretty.rs\ module provides a debug printer for the item tree, aiding in development and diagnostics.

_crates/hir-def/src/item\tree · high confidence

Refactored import insertion and merging to use SyntaxEditor

The import handling logic in \crates/ide-db/src/imports\ has been rewritten to use the \SyntaxEditor\ API instead of the previous \ted\/\SyntaxFactory\ approach. This change introduces new functions like \insert\_use\_with\_editor\ and \insert\_uses\_with\_editor\ for adding imports, and updates \merge\_imports\ to use \SyntaxFactory\ within the editor context. The refactoring also adds support for a new \One\ import granularity option, improves cfg-awareness during import insertion, and aligns import sorting with rustfmt's algorithm.

crates/ide-db/src/imports · high confidence

Refactored syntax tree editing with immutable tree support and improved change planning

The syntax editor in \crates/syntax/src/syntax\_editor\ has been refactored to support immutable syntax trees, introducing a new \EditPlan\ that validates and orders changes before execution to prevent overlapping or conflicting edits. This change includes new helper methods like \add\_generic\_param\ and \get\_or\_create\_where\_clause\ for AST manipulation, and improves the mapping system to correctly handle upmapping of nodes and tokens through disjoint syntax changes. The refactoring also migrates several existing assists (like \convert\_bool\_then\ and \generate\_enum\_variant\) to use the new \SyntaxEditor\ API, ensuring consistent behavior and fixing issues with nested edits and duplicate changed elements.

_crates/syntax/src/syntax\editor · high confidence

Regenerated AST node and token definitions

The generated AST node definitions in \crates/syntax/src/ast/generated/nodes.rs\ and token definitions in \tokens.rs\ have been regenerated to reflect updated grammar rules. This update introduces new AST nodes for inline assembly constructs (such as \AsmExpr\, \AsmOption\, and \AsmOperandNamed\) and adds dedicated token types for C-strings (\CString\), ensuring the syntax tree accurately represents these language features.

crates/syntax/src/ast/generated · high confidence

Replace \`log\` with \`tracing\` and add structured profiling layers

The internal logging infrastructure in rust-analyzer has been migrated from the \log\ crate to \tracing\, enabling more granular and structured diagnostics. This change introduces new configuration options via environment variables: \RA\_PROFILE\ allows users to enable hierarchical span profiling with timing and depth filtering, while \RA\_PROFILE\_JSON\ exports span timings as newline-delimited JSON for external analysis. Additionally, solver-specific logs from \rustc\_type\_ir\ and \rustc\_next\_trait\_solver\ are now filtered and formatted separately via \SOLVER\_DEBUG\, and log timestamps now use local time offsets where available to ensure accurate chronological ordering.

crates/rust-analyzer/src/tracing · high confidence

Replace local pattern analysis with rustc\_pattern\_analysis

The match exhaustiveness and redundancy checks in \hir-ty\ now use the upstream \rustc\_pattern\_analysis\ library (v0.42.0) instead of a local implementation. This change improves the accuracy of pattern matching diagnostics, such as detecting non-exhaustive matches and redundant arms, by leveraging the standardized algorithm used by the Rust compiler.

_crates/hir-ty/src/diagnostics/match\check · high confidence

Replaced macro matcher with NFA-based parser and rewrote transcriber

The macro-by-example (MBE) expansion engine in \crates/mbe/src/expander\ has been refactored to use a new NFA-based parser for matching macro patterns, replacing the previous implementation. This change introduces a new \matcher.rs\ module that handles pattern matching via non-deterministic finite automata threads, and a rewritten \transcriber.rs\ that manages template interpolation and binding resolution. For users, this results in improved performance and more robust handling of complex macro patterns, including better error recovery for missing bindings and support for new metavariable expressions like \${count()}\ and \${concat(...)}\.

crates/mbe/src/expander · high confidence

Reworked macro-by-example (mbe) crate with new architecture

The \crates/mbe/src\ module has been completely restructured to support Macro 2.0 and improved hygiene. The crate now exposes a cleaner public API via \lib.rs\, including \DeclarativeMacro\ for parsing both \macro\_rules!\ and the new \macro\ syntax, and explicit error types (\ParseError\, \ExpandError\) with \Display\ implementations. The expansion logic is split into dedicated modules: \expander.rs\ handles rule matching and transcription, \parser.rs\ defines the new \Op\ and \MetaVarKind\ structures (including edition-aware \Expr\ kinds), and \macro\_call\_style.rs\ distinguishes between function-like, attribute, and derive macro calls. Additionally, a new \benchmark.rs\ module was added to provide performance regression tests for macro parsing and expansion.

crates/mbe/src · high confidence

Rewritten method resolution to align with rustc's selection and confirmation steps

The method resolution logic in \crates/hir-ty\ has been restructured to follow rustc's approach more closely, splitting the process into distinct candidate assembly/selection (\probe.rs\) and confirmation (\confirm.rs\) phases. This change refactors how the type checker identifies valid method candidates, handles receiver adjustments (such as autoderefs and autoref), and validates the selected method's signature and obligations, ensuring more accurate and consistent method lookup behavior for users.

_crates/hir-ty/src/method\resolution · high confidence

Support for macros in doc attributes and improved source mapping

The documentation extraction logic in \crates/hir-def\ has been refactored to support \\#\[doc = macro!()\]\ patterns, allowing macros within doc attributes to be expanded. This change introduces a new \Docs\ struct that maintains a source map to link the concatenated documentation string back to the original AST nodes, which is essential for IDE features like link resolution and highlight injection. The implementation also handles edge cases such as outlining modules, inner doc comments, and macro recursion overflow, ensuring that source locations are accurately tracked even when documentation is generated via macros.

crates/hir-def/src/attrs · high confidence

Suppress build warnings for rust\_analyzer cfg flag

The proc-macro-test implementation crate now explicitly registers the \rust\_analyzer\ configuration flag via its build script. This prevents Cargo from emitting warnings about unknown configuration flags when the code uses \\#\[cfg(rust\_analyzer)\]\, ensuring a cleaner build output for users running the analyzer.

crates/proc-macro-srv/proc-macro-test/imp · high confidence

Syntax-bridge crate split and macro expansion prettification improvements

The \syntax-bridge\ module has been split into its own crate, separating the public \tt\ API from its internal storage and introducing per-token edition tracking for more accurate parsing. Macro expansion output is now prettified using \SyntaxEditor\, which adds necessary whitespace (such as spaces after commas and around operators) and handles \$crate\ replacement, while doc comments are now represented as distinct nodes rather than trivia.

crates/syntax-bridge · high confidence

Test crate now exposes its build-time location

The proc-macro-test crate, now located within the proc-macro-srv directory, exposes a public constant \PROC\_MACRO\_TEST\_LOCATION\ that reflects the value of the \PROC\_MACRO\_TEST\_LOCATION\ environment variable at compile time. This allows test code to identify the crate's location dynamically rather than relying on hardcoded paths or include directives.

crates/proc-macro-srv/proc-macro-test/src · high confidence

Toolchain binary discovery and command execution logic

The toolchain module now explicitly manages how \cargo\, \rustc\, and related executables are located and invoked. It prioritizes binaries found in \$CARGO\_HOME/bin\ (via cargo proxies) when using the \prefer\_proxy\ path, while the standard \path\ method checks environment variables (like \$CARGO\) first, then \$PATH\, and finally \$CARGO\_HOME/bin\. Additionally, commands spawned by the toolchain now respect the \$CARGO\_HOME\ environment variable for locating binaries and automatically set \RUSTUP\_AUTO\_INSTALL=0\ to prevent rustup from silently installing new toolchains. For toolchains version 1.95.0 and above, JSON target specifications are passed using the \-Zjson-target-spec\ flag.

crates/toolchain · high confidence

Trait implementation completion now prioritizes required items

When completing associated items inside a trait implementation block, the completion list now explicitly prioritizes required items (those that must be implemented to satisfy the trait) over optional ones. This helps users quickly identify and fill in the mandatory parts of a trait implementation first.

_crates/ide-completion/src/completions/item\list · high confidence

Type inference engine migrated to the next trait solver

The type inference logic in \crates/hir-ty/src/infer\ has been rewritten to use the new next trait solver. This migration introduces new modules for handling autoderef, call inference, type casts, closures, and coercion, and replaces the previous solver infrastructure. Users will benefit from more accurate type checking and improved diagnostic messages as the inference engine aligns more closely with rustc's implementation.

crates/hir-ty/src/infer · high confidence

Updated generated lint definitions in IDE database

The generated lint definitions in \crates/ide-db/src/generated/lints.rs\ have been refreshed to reflect the latest Rust compiler changes. This update includes new lints (such as \ambiguous\_associated\_items\ and \ambiguous\_glob\_imported\_traits\), removed lints (like \box\_pointers\ and \strict\_overflow\_ops\), and adjustments to default severities and edition-specific warnings for existing lints. Users will see updated lint suggestions and severity levels in the IDE's analysis.

crates/ide-db/src/generated · high confidence

Updated lexer test data for Rust edition 2024 features

The lexer test suite in \crates/parser/test\_data/lexer/ok\ has been updated to reflect new tokenization behaviors. The lexer now emits a dedicated \FRONTMATTER\ token for YAML frontmatter blocks (e.g., \--- ... ---\), allowing them to be parsed alongside standard code. Additionally, the \guardied\_str\_prefix\_edition\_2021\ test confirms that the \\#\ prefix for raw strings is treated as a separate \POUND\ token rather than part of the string literal in older editions, and the \single\_line\_comments\ test data has been adjusted to show comments as standard \COMMENT\ tokens instead of distinct doc-comment types.

_crates/parser/test\data/lexer/ok · medium confidence

Updated parser error-recovery test expectations

The parser's error-recovery behavior has changed, resulting in updated expected outputs for 39 test cases in \crates/parser/test\_data/parser/err\. These updates reflect improved handling of malformed Rust code, including better recovery for incomplete function parameters, missing struct field commas, broken generic type parameters, and various syntax errors in expressions and attributes. Users will see more precise and context-aware error messages when writing invalid code.

_crates/parser/test\data/parser/err · high confidence

Updated parser syntax kinds to support new Rust language features

The parser's syntax kind definitions have been regenerated to include new tokens and node types required for recently added Rust language features. This update adds support for syntax such as \become\ expressions, \yield\ expressions, \try\ blocks, \let\ chains, \let...else\ patterns, \safe\ keywords in extern blocks, and various inline assembly variants (\asm!\, \global\_asm!\, \naked\_asm!\). It also introduces distinct handling for doc comments, float literals, and macro expressions, ensuring the parser correctly recognizes these constructs as valid syntax.

_crates/parser/src/syntax\kind · high confidence

VS Code extension restructured with ESLint and new configuration files

The VS Code extension source has been reorganized, introducing ESLint as the primary linting tool (replacing TSLint) and adding dedicated configuration files for Prettier and ESLint. The extension now includes a \.vscodeignore\ manifest to control packaging, a \.gitignore\ for local build artifacts, and a new TextMate grammar file (\ra\_syntax\_tree.tmGrammar.json\) to provide syntax highlighting for the syntax tree view. Additionally, a \language-configuration.json\ file is now present to define standard editor behaviors like bracket matching and auto-closing pairs.

editors/code · high confidence

Fixes

Improved IDE resolution for macros and derive attributes

The IDE layer now correctly resolves syntax nodes originating from macro expansions and derive attributes. Previously, features like 'Go to Definition' or 'Find Usages' could fail or return incorrect results when the cursor was inside code generated by \include!\, \\#\[derive(...)\]\, or other attribute macros. This change ensures that macro calls and their resulting definitions are properly tracked in the semantic model, allowing IDE features to work seamlessly within expanded code.

crates/hir/src/semantics · high confidence

Test coverage

Add comprehensive completion test suites for IDE contexts; Add macro expansion tests for builtin derives, builtin functions, MBE, and proc macros; Added VS Code test runner script; Added benchmarks for SmolStr performance; Added comprehensive test suite for SmolStr; Added comprehensive test suite for text-size library; Added comprehensive tests for constant evaluation; Added integration test infrastructure for proc-macro-srv-cli; Added integration tests for proc-macro server expansion; Added integration tests for proc-macro-srv-cli protocols; Added layout tests for closure capture behavior; Added proc-macro test implementation for span and literal handling; Added regression tests for complex macro diagnostics; Added regression tests for the new type solver; Added slow-integration test infrastructure for rust-analyzer; Added test coverage for parser prefix and top-level entry points; Added tests for block-level item scoping and imports; Added tests for const-eval intrinsics; Added tests for expression store body lowering and signature printing; Added tests for name resolution edge cases; Added type-inference test suites for closure captures, coercion, and diagnostics; Added unit tests for Rust Analyzer VS Code extension components; Expanded parser validation and fuzzing test coverage; New dyn-compatibility test suite for trait object safety; New macro expansion tests for MBE matching, metavariable expressions, and syntax; New test utilities for fixtures, benchmarks, and linear performance checks; Parser test suite expanded with new inline test cases; Parser test suite updated with new Rust syntax coverage; Regenerated parser test runner with expanded test coverage; Updated generated doctests for IDE assists.

Dependencies

Routine dependency updates across Rust and Node.js ecosystems

This release includes routine updates to various Rust and Node.js dependencies, including bumping versions for \salsa\, \chalk\, \rowan\, \lsp-types\, \vscode-languageclient\, and \esbuild\. These changes maintain compatibility with the latest language server protocol specifications and underlying tooling, ensuring stable performance and security for the Rust analyzer extension.

(dependencies) · high confidence

Housekeeping

Added license files to the LSP server

The lib/lsp-server directory now includes symlinks to the project's Apache and MIT license files, ensuring that the server's distribution includes the necessary legal notices.

lib/lsp-server · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.

Score

  • CAI 55 → 63 (+7.8)
  • Rubric changed (rubric-2026.09.8 → rubric-2026.09.16) — scores are not directly comparable.

Lenses

  • Code Health 72 → 73 (+0.5)
  • Architecture 64 → 70 (+5.2)
  • Maturity 65 → 62 (-3.7)
  • Readiness 65 → 63 (-2.1)
  • Security 42 → 61 (+19.0)
  • Performance 85 (new)

Resolved (101)

  • Documentation: no architecture or design documentation (docs/book/src/features.md)
  • Documentation: no installation or build instructions (README.md)
  • Documentation: no installation or build instructions (docs/book/src/installation.md)
  • Documentation: no usage examples (README.md)
  • Documentation: written for insiders (docs/book/src/security.md)
  • Duplicated block (8 lines × 2) (crates/ide-completion/src/render/const_.rs)
  • Duplicated block (9 lines × 2) (crates/ide-completion/src/completions/attribute.rs)
  • High CVE: [CVE redacted] (editors/code/package-lock.json)
  • High CVE: [CVE redacted] (editors/code/package-lock.json)
  • High CVE: [CVE redacted] (editors/code/package-lock.json)
  • High CVE: [GHSA redacted] (editors/code/package-lock.json)
  • High CVE: [GHSA redacted] (editors/code/package-lock.json)
  • High CVE: [GHSA redacted] (editors/code/package-lock.json)
  • High CVE: [GHSA redacted] (editors/code/package-lock.json)
  • High CVE: [GHSA redacted] (editors/code/package-lock.json)
  • Hotspot: crates/hir-def/src/attrs/docs.rs (crates/hir-def/src/attrs/docs.rs)
  • Hotspot: crates/hir-def/src/expr_store/pretty.rs (crates/hir-def/src/expr_store/pretty.rs)
  • Hotspot: crates/hir-def/src/find_path.rs (crates/hir-def/src/find_path.rs)
  • Hotspot: crates/hir-def/src/hir.rs (crates/hir-def/src/hir.rs)
  • Hotspot: crates/hir-def/src/item_scope.rs (crates/hir-def/src/item_scope.rs)
  • …and 81 more

New (59)

  • Duplicate read operation across different types. SourceDatabase is the primary database trait, but Files exposes an identical file_text method. This suggests Files is either a redundant wrapper or a legacy alias, creating confusion about which type to use for reading file content.
  • Duplicate read operation. Files.file_source_root duplicates SourceDatabase.file_source_root with inconsistent signature.
  • Duplicate read operation. Files.source_root duplicates SourceDatabase.source_root with inconsistent signature (explicit db parameter in Files).
  • Duplicate write operation with inconsistent signatures. SourceDatabase has set_file_text as a direct method, while Files has set_file_text that takes the database as an explicit argument. This inconsistency in how the database context is passed (implicit receiver vs explicit parameter) is confusing.
  • Duplicate write operation. Files.set_file_source_root_with_durability duplicates SourceDatabase.set_file_source_root_with_durability with inconsistent signature.
  • Duplicate write operation. Files.set_source_root_with_durability duplicates SourceDatabase.set_source_root_with_durability with inconsistent signature.
  • Duplicated block (14 lines × 2) (crates/ide-completion/src/render/const_.rs)
  • Duplicated block (5 lines × 2) (crates/parser/src/grammar/expressions/atom.rs)
  • Function::hir_fmt (cognitive 16) (crates/hir/src/display.rs)
  • High CVE: [GHSA redacted] (editors/code/package-lock.json)
  • High CVE: [GHSA redacted] (editors/code/package-lock.json)
  • High CVE: [GHSA redacted] (editors/code/package-lock.json)
  • High CVE: [GHSA redacted] (editors/code/package-lock.json)
  • High CVE: [GHSA redacted] (editors/code/package-lock.json)
  • High: security finding (details withheld)
  • Hotspot: crates/ide-completion/src/completions/attribute/cfg.rs (crates/ide-completion/src/completions/attribute/cfg.rs)
  • Members sharing a duplicated core (4 members, 50+ identical tokens) (crates/hir-ty/src/diagnostics/expr.rs)
  • Members sharing a duplicated core (4 members, 50+ identical tokens) (crates/ide/src/hover/render.rs)
  • Members sharing a duplicated core (4 members, 50+ identical tokens) (crates/rust-analyzer/src/cli/analysis_stats.rs)
  • No ADRs found
  • …and 39 more

Changes since last survey

  • 115 commits — 81 feature/other, 34 fixes

By area

  • (repo) — 72 commits
  • crates/ide-completion — 10 commits
  • crates/hir-ty — 8 commits
  • crates/hir — 4 commits
  • crates/ide — 3 commits
  • crates/ide-assists — 3 commits
  • editors/code — 3 commits
  • (root) — 2 commits
  • crates/rust-analyzer — 2 commits
  • .github/workflows — 1 commit
  • crates/hir-def — 1 commit
  • crates/ide-diagnostics — 1 commit
  • crates/parser — 1 commit
  • crates/test-utils — 1 commit
  • crates/vfs — 1 commit
  • crates/vfs-notify — 1 commit
  • xtask/src — 1 commit

Notable commits

  • fix: Auto merge of #162573 - erickt:fix-fuchsia-tests, r=jieyouxu
  • fix: Merge pull request #23352 from anatawa12/fix-panic-with-is-impl-with-types-from-builtin-derive-impl
  • fix: Merge pull request #23359 from 0xull/fix-23327-macro-item-cache
  • fix: Merge pull request #23361 from Wilfred/fix/remove-eslint-define-config
  • fix: Merge pull request #23368 from edragain2nd/fix/early_return_binary_op_error
  • fix: Merge pull request #23375 from scovich/lsp-macos-hang-fix
  • fix: Merge pull request #23409 from Wilfred/fix/async-closure-hrtb
  • fix: Merge pull request #23410 from sainad2222/fix/semantic-tokens-delta-cache
  • fix: Merge pull request #23421 from 0xull/fix-23131
  • fix: Rollup merge of #161903 - nnethercote:fix-target_config-cycle, r=nikic
  • fix: Rollup merge of #162610 - malezjaa:fix-tailcall-indirect-return, r=folkertdev
  • fix: Rollup merge of #162703 - malezjaa:regression-test-valtree-leaf-const, r=jieyouxu
  • fix: Rollup merge of #162895 - chenyukang:yukang-fix-148207-generated-derive-suggestion, r=petrochenkov
  • fix: fix: Include working directory when discover command fails
  • fix: fix: Panic in async closures with HRTB
  • fix: fix: Panic when trait solver re-enters itself
  • fix: fix: add type_match relevance for type-alias
  • fix: fix: avoid recursion when casting enum variant discriminants
  • fix: fix: cache macro-expanded roots when climbing ancestors
  • fix: fix: coersion safe fn to unsafe fn
  • …and 95 more

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

rust-lang/rust-analyzer was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 28 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 03fcb77246f2568adb0e9b2fa60d19c6cc1686f4 — the exact code this score is about.
  • Scored under rubric-2026.09.16 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-d46da229e3fd.