Skip to content
CAI
Software that uses CAICheck a score

rust-lang/rust

46.9

Weak · 14 November 2026

2288.6k

lines of production code

Rust

primary language

6

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Features

Add AArch64 MTE, Random Number, and Prefetch intrinsics

The \core\_arch\ crate now exposes new unstable AArch64 intrinsic modules: \stdarch\_aarch64\_mte\ for Memory Tagging Extension intrinsics, \stdarch\_aarch64\rand\ for ACLE random number generation (\\\rndr\, \\\_rndrrs\), and \stdarch\_aarch64\_prefetch\ for prefetch hints. These are gated behind their respective feature flags and are not available on \arm64ec\. The module structure for AArch64 has been reorganized to include these new submodules alongside the existing NEON and SVE/SVE2 implementations.

_library/stdarch/crates/core\arch · high confidence

Add IntervalSet for managing contiguous integer ranges

The compiler now includes an IntervalSet data structure in the rustc\_index library, allowing users to efficiently store, merge, and query sets of contiguous integer intervals. This new capability supports operations such as inserting ranges, checking containment, and finding the last set value within a specific range, which can be leveraged for optimizations involving index or range-based logic within the compiler.

_compiler/rustc\index/src/interval · high confidence

Add LoongArch LSX/LASX intrinsic code generator

A new code generator tool (\stdarch-gen-loongarch\) has been added to automatically produce Rust bindings and tests for the LoongArch LSX and LASX SIMD instruction sets. The tool parses GCC intrinsic headers (\lsxintrin.h\, \lasxintrin.h\) and specification files to generate portable Rust implementations where possible, while emitting \extern "llvm-intrinsic"\ declarations for hardware-specific operations. This enables developers to use LoongArch SIMD features in Rust with generated, up-to-date intrinsic definitions.

library/stdarch/crates/stdarch-gen-loongarch · high confidence

Add SortedIndexMultiMap data structure

Introduces a new \SortedIndexMultiMap\ type in \rustc\_data\_structures\ that combines the ordered lookup of \SortedMap\ with the insertion-order preservation and O(1) index-based access of \IndexVec\. This hybrid structure allows multiple equivalent items to be stored and retrieved in the order they were inserted, supporting efficient key-based iteration and index-based access, along with new methods like \contains\_key\ and \get\_by\_key\_enumerated\.

_compiler/rustc\_data\_structures/src/sorted\map · high confidence

Add assembly test runner for rustc\_codegen\_gcc

The asm-tester tool is introduced to execute assembly-level tests for the GCC codegen backend. It configures the compiletest\_rs framework to run tests located in the \tests/asm\ directory, requiring an LLVM FileCheck path and specific rustc flags to validate generated assembly output.

_compiler/rustc\_codegen\_gcc/build\system/asm-tester · high confidence

Add function pointer type discriminator computation for pointer authentication

The compiler now includes a new module in \rustc\_middle\ that computes function pointer type discriminators compatible with Clang's pointer authentication (PAC) scheme. This implementation normalizes Rust function types into a Clang-compatible representation, encodes them into a byte stream, and hashes the result using a stable SipHash-2-4 algorithm (mirroring LLVM's behavior) to generate a 16-bit discriminator. This ensures that function pointers exchanged between Rust and C code maintain consistent pointer authentication semantics across language boundaries.

_compiler/rustc\middle/src/ptrauth · high confidence

Add markdown formatting support to \`rustc --explain\` output

The \rustc --explain\ command now renders its documentation using a new internal markdown parser and renderer. Users will see formatted output in the terminal, including bold, italic, and strikethrough text, headings, lists, links, and inline code. Code blocks are rendered with dimmed styling by default, and the system supports syntax highlighting for code blocks if a formatter is provided. This change improves the readability of compiler error explanations by allowing structured markdown content to be displayed with appropriate terminal styling.

_compiler/rustc\errors/src/markdown · high confidence

Add proc-macro derives for TypeFoldable and TypeVisitable with next-solver support

A new \macros\ crate has been added to rust-analyzer, providing procedural macros (\TypeFoldable\, \TypeVisitable\, and \GenericTypeVisitable\) that allow structs and enums to implement type folding and visiting capabilities. These derives are specifically configured to work with the \next\_solver\ infrastructure, binding to \hir\_ty::next\_solver::DbInterner\ and supporting attributes like \\#\[type\_foldable(identity)\]\ and \\#\[type\_visitable(ignore)\]\ to control field traversal behavior.

src/tools/rust-analyzer/crates/macros · high confidence

Add rustc\_codegen\_gcc example programs

The \compiler/rustc\_codegen\_gcc/example\ directory now contains a suite of example programs demonstrating the GCC backend's capabilities. These include \alloc\_example.rs\ and \alloc\_system.rs\ for custom allocation, \mini\_core.rs\ and \mini\_core\_hello\_world.rs\ for bare-metal/no-core execution, \example.rs\ for basic codegen verification, \arbitrary\_self\_types\_pointers\_and\_wrappers.rs\ for advanced type coercion, and \std\_example.rs\ for standard library features including coroutines and SIMD intrinsics.

_compiler/rustc\_codegen\gcc/example · high confidence

Add shell completions for the \`x\` and \`x.py\` bootstrap tools

The \src/etc\ directory now includes generated shell completion scripts for the \x\ and \x.py\ bootstrap commands, covering Fish and PowerShell. These files provide tab-completion for all available subcommands (such as \build\, \check\, \test\, \miri\, \perf\, and \vendor\) and their associated flags (like \--stage\, \--jobs\, \--config\, and \--timings\), improving the developer experience when interacting with the build system.

src/etc · high confidence

Add symcheck tool for validating compiler-builtins archives

A new host-side CLI tool, \symcheck\, has been added to the compiler-builtins crate to inspect compiled archives and object files during CI. It verifies that symbols match the intended target, detects duplicate symbols, ensures core library symbols are not missing, and checks for executable stack violations (\.note.GNU-stack\). The tool supports both \--build-and-check\ (invoking Cargo) and \--check\ (scanning existing paths) modes, and includes a comprehensive test suite to validate these checks across various architectures and file formats.

library/compiler-builtins/crates/symcheck · high confidence

Add sysroot crate as a dependency aggregator

A new \sysroot\ crate has been added to the library directory. It is currently an empty crate intended solely to serve as a dependency aggregator for other standard library crates, allowing them to be depended upon collectively.

library/sysroot · high confidence

Add thousands formatting module for readable number output

A new \thousands\ module has been added to \rustc\_data\_structures\ to provide a lightweight alternative to the external \thousands\ crate for formatting large numbers with underscore separators. This introduces public functions \usize\_with\_underscores\, \isize\_with\_underscores\, and \f64p1\_with\_underscores\ that format integers and floats (with one decimal place) by inserting underscores every three digits, while correctly handling negative signs and stopping at non-digit characters like decimal points or exponents. The module includes comprehensive tests verifying its behavior for various edge cases, including empty strings, scientific notation, and negative values.

_compiler/rustc\_data\structures/src/thousands · high confidence

Added rustc-std-workspace crate sources

The \src/rustc-std-workspace\ directory now contains the crates.io versions of the \rustc-std-workspace-core\, \rustc-std-workspace-alloc\, and \rustc-std-workspace-std\ crates. These files act as thin re-export wrappers around the standard library equivalents (\core\, \alloc\, and \std\ respectively), providing a separate copy of these crates distinct from the versions maintained in the \library\ directory.

src/rustc-std-workspace · high confidence

Added shell-style format string parsing for printf-like syntax

The compiler now supports parsing shell-style format strings (e.g., \$0\, \$NAME\, \$$\) within the \format\_foreign\ macro infrastructure. This change introduces a new module that identifies ordinal, named, and escape substitutions in input strings and translates them into Rust's standard \{}\ placeholder syntax, enabling better compatibility with C-style \printf\ format strings in foreign language contexts.

_compiler/rustc\_builtin\_macros/src/format\foreign/shell · high confidence

Cranelift backend integration into Rust repository

The Cranelift codegen backend is now integrated directly into the Rust compiler repository, providing build instructions, configuration files, and a test script for local development. This change establishes the infrastructure for nightly synchronization with the upstream Cranelift project and sets the toolchain requirements for building the backend.

_compiler/rustc\_codegen\cranelift · high confidence

Cranelift backend rewritten to support 128-bit integers and 16/128-bit floats

The Cranelift codegen backend has been completely rewritten to add support for 128-bit integer operations (i128/u128) and 16-bit/128-bit floating-point types (f16/f128). This change introduces new modules for handling 128-bit arithmetic via compiler-builtins, implementing f16/f128 conversion and comparison logic, and integrating these types into the core type mapping and constant handling systems.

_compiler/rustc\_codegen\cranelift/src · high confidence

Derive macros restructured into individual modules with new capabilities

The \\#\[derive\]\ implementation has been refactored from a monolithic file into separate modules (clone, copy, debug, default, eq, from, hash, ord, partial\_eq, partial\_ord, etc.), introducing a new \\#\[derive(From)\]\ macro for single-field structs and a new \\#\[derive(CoercePointee)\]\ macro for transparent pointer coercion. The \Debug\ derive now supports a \fmt\_debug\ option to control output detail, and \Clone\ derives now automatically implement the internal \TrivialClone\ marker for simple cases to enable library optimizations.

_compiler/rustc\_builtin\macros/src/deriving · high confidence

Enable const evaluation for atomic and SIMD intrinsics

The compiler's constant evaluation engine now supports executing atomic and SIMD (Single Instruction, Multiple Data) intrinsics at compile time. This change introduces implementations for atomic operations (such as loads, stores, compare-and-swap, and read-modify-write operations) and a wide range of SIMD operations (including vector insertion/extraction, splatting, arithmetic, logical operations, and floating-point rounding). As a result, code that previously required runtime execution for these operations can now be evaluated during compilation, enabling more aggressive constant folding and compile-time checks for programs using these features.

_compiler/rustc\_const\eval/src/interpret/intrinsics · high confidence

Enable incremental caching for derive macro expansions

The compiler now caches the results of derive macro expansions, allowing incremental compilation to skip re-running derive macros when their inputs have not changed. This optimization is implemented in the new \rustc\_expand\_queries\ crate, which provides a query for \derive\_macro\_expansion\ and hooks into the dependency graph to ensure correct invalidation when the defining crate changes.

_compiler/rustc\interface · high confidence

Expanded Cranelift codegen example suite

The \compiler/rustc\_codegen\_cranelift/example\ directory now includes a comprehensive set of new Rust source files that serve as concrete test cases and demonstrations for the Cranelift backend. These additions cover a wide range of language features and codegen scenarios, including arbitrary self-types with pointer wrappers, coroutine and generator block iteration, type-alias impl-trait opaque filtering, and extensive standard library usage (threads, synchronization, I/O, SIMD intrinsics, and 128-bit integer operations). The suite also introduces a \mini\_core\ library to support \\#!\[no\_core\]\ compilation, enabling the testing of low-level language items, intrinsics, and unsized types without the standard library.

_compiler/rustc\_codegen\cranelift/example · high confidence

Expanded runtime CPU feature detection across multiple architectures

The \std\_detect\ library now provides runtime detection for a significantly broader set of CPU features. On x86, new features \movdir64b\, \movdiri\, and \clflushopt\ are now detectable, and the \cpuid\ instruction usage is now safe. On AArch64, detection for SME and SVE variants (such as \sme\, \sve-b16b16\, \sme-f16f16\) and PAuth features has been added or improved, particularly for Darwin. RISC-V detection now supports a wide range of ratified extensions (like \zmmul\, \zaamo\, \zabha\) with Linux kernel version requirements documented. LoongArch, ARM (Aarch32), MIPS, PowerPC, and s390x also gain or refine their respective runtime feature detection macros (e.g., \is\_loongarch\_feature\_detected\, \is\_arm\_feature\_detected\, \is\_mips\_feature\_detected\, \is\_powerpc\_feature\_detected\, \is\_s390x\_feature\_detected\), enabling applications to adapt to specific hardware capabilities at runtime on these platforms.

_library/std\detect · high confidence

Extract pattern analysis into a standalone crate with improved diagnostics

The pattern analysis and match exhaustiveness logic has been extracted from the main compiler into a new, standalone \rustc\_pattern\_analysis\ crate. This change introduces a generic \PatCx\ context trait, allowing the core algorithm to be reused and tested independently of the full compiler infrastructure. For users, this results in more precise and actionable compiler diagnostics for match exhaustiveness, including better handling of non-exhaustive enums, clearer warnings for overlapping or non-contiguous range endpoints, and improved error reporting when mixing deref patterns with normal constructors.

_compiler/rustc\_pattern\analysis · high confidence

GCC backend now supports Fat LTO and dynamic linking

The GCC codegen backend now implements Fat Link-Time Optimization (LTO) by merging upstream module bitcode into a single monolithic module for optimization, and adds initial support for dynamically linked crates. This change introduces new \lto.rs\ and \write.rs\ modules to handle LTO data preparation, module merging, and the necessary GCC JIT flags (such as \-flto=auto\ and \-fuse-linker-plugin\) to produce optimized object files.

_compiler/rustc\_codegen\gcc/src/back · high confidence

Hexagon code generator now produces HVX vector intrinsics alongside scalar ones

The \stdarch-gen-hexagon\ tool has been updated to generate Rust wrapper functions for Hexagon Vector eXtensions (HVX) in addition to the existing scalar intrinsics. It now parses the checked-in \hvx\_hexagon\_protos.h\ header to produce \v64.rs\ (64-byte vector mode) and \v128.rs\ (128-byte vector mode) files, mapping HVX builtins to Rust types like \HvxVector\ and \HvxVectorPred\. The generator also supports a \--rustfmt-path\ argument to control code formatting of the generated output.

library/stdarch/crates/stdarch-gen-hexagon · high confidence

Initial debuginfo and unwind support for Cranelift codegen

The Cranelift backend now generates DWARF debug information and \.eh\_frame\ unwind tables, enabling source-level debugging and proper stack unwinding for Rust programs compiled with \rustc\_codegen\_cranelift\. This implementation handles basic types, arrays, tuples, and pointers, supports source file embedding and MD5 hashing for source maps, and correctly manages relocation of debug sections in object files.

_compiler/rustc\_codegen\cranelift/src/debuginfo · high confidence

Initial implementation of IDE feature modules

This change introduces the core implementation files for several new IDE features in the \crates/ide\ crate, including annotations (runnables, implementations, references), call hierarchy, child module navigation, documentation link resolution and rewriting, macro expansion, selection extension, dependency tree fetching, and file structure outlining. These modules provide the underlying logic for features such as 'Open Docs', 'Expand Macro Recursively', 'Locate child modules', and the 'Rust Dependencies' panel.

src/tools/rust-analyzer/crates/ide · high confidence

Initial implementation of LLVM and SIMD intrinsic codegen in Cranelift backend

The Cranelift codegen backend (\rustc\_codegen\_cranelift\) now includes a complete intrinsic handling module, introducing dedicated files for LLVM intrinsics (\llvm.rs\), architecture-specific LLVM intrinsics (\llvm\_aarch64.rs\, \llvm\_x86.rs\), and SIMD intrinsics (\simd.rs\). This change enables the backend to translate a wide range of standard library operations, including SIMD vector comparisons, shuffles, and arithmetic, as well as x86/AArch64 specific intrinsics like gather operations and NEON instructions, directly into Cranelift IR. Previously, these intrinsics were likely unsupported or handled via fallbacks; this commit provides native codegen support, significantly expanding the set of Rust features available when compiling with the Cranelift backend.

_compiler/rustc\_codegen\cranelift/src/intrinsics · high confidence

Initial source tree layout and bootstrap configuration

The \src\ directory is established with a new README describing the bootstrapping build system and submodules, alongside the \stage0\ file defining the bootstrap compiler (beta, dated 2026-09-29) and its distribution artifacts, the \version\ file setting the project version to 1.101.0, and submodules for \gcc\ and \llvm-project\. The legacy \Makefile\ is removed, indicating a shift away from the previous build configuration.

src · high confidence

Inline assembly support added for AVR, BPF, CSKY, Hexagon, and m68k

The compiler now supports inline assembly (\asm!\) for several new architectures. This change introduces register classes, operand types, and error handling for AVR, BPF, CSKY, Hexagon, and m68k, enabling developers to write low-level assembly code for these platforms.

_compiler/rustc\target · high confidence

Introduce AOT and JIT codegen drivers for Cranelift backend

The Cranelift backend now includes dedicated drivers for Ahead-Of-Time (AOT) compilation and Just-In-Time (JIT) execution. The new \aot.rs\ module handles writing object files suitable for linking into standalone executables, while \jit.rs\ enables running programs directly without writing intermediate object files. The \mod.rs\ file provides the shared logic for predefining mono items and manages the profiling infrastructure. This change adds the capability to execute Rust code via JIT, a feature previously unavailable in this backend.

_compiler/rustc\_codegen\cranelift/src/driver · high confidence

Introduce AST definitions for automatic differentiation and allocator shim internals

The compiler now includes new AST-level definitions to support automatic differentiation (autodiff) and refine allocator handling. For autodiff, the \autodiff\_attrs\ module defines the \DiffMode\ (Source, Forward, Reverse) and \DiffActivity\ (Active, Dual, Duplicated, etc.) enums, along with validation logic for how these attributes apply to function inputs, outputs, and types, enabling the Enzyme backend to process derivative computations. Additionally, the \typetree\ module provides \TypeTree\ and \FncTree\ structures that describe Rust types in memory layout terms, which are passed to the backend to assist in generating correct derivative code. On the allocator side, the new \allocator\ module exposes \AllocatorKind\ and specific function name generators (\global\_fn\_name\, \default\_fn\_name\) for the allocator shim, replacing previous internal mechanisms with explicit, queryable definitions for global and default allocation strategies.

_compiler/rustc\ast/src/expand · high confidence

Introduce AST validation and feature-gate passes

The compiler now includes a new \rustc\_ast\_passes\ crate that performs post-expansion validation of the Abstract Syntax Tree (AST) before it is lowered to HIR. This pass enforces syntactic validity for constructs that may be produced by attribute macros (such as functions without bodies in modules) and applies feature gates for unstable syntax like negative impls, auto traits, and \impl Trait\ in type aliases. It also introduces specific diagnostics for invalid function signatures, including checks for C-variadic argument ordering, splat argument limits, and forbidden bound contexts.

_compiler/rustc\_ast\passes · high confidence

Introduce CI utilities and Fuchsia test runner scripts

Added new Python scripts to support CI and testing workflows: \ci-util.py\ provides utilities for calculating change matrices, locating benchmark baselines, and handling regression directives; \update-api-list.py\ generates and validates public API lists for the \libm\ crate; \fuchsia-test-runner.py\ orchestrates the Rust toolchain test suite on Fuchsia using \ffx\; and \common.py\ defines the schema and data classes for the debugger tester framework.

python · high confidence

Introduce HIR pretty-printing module

Adds a new \rustc\_hir\_pretty\ crate that provides functionality to convert High-Level Intermediate Representation (HIR) nodes into their source-code-like string representations. This includes printing items, expressions, patterns, types, and attributes, enabling diagnostics and tools to display HIR structures in a human-readable format.

_compiler/rustc\_hir\pretty · high confidence

Introduce Lengauer-Tarjan dominator tree algorithm

The \rustc\_data\_structures\ crate now includes a new implementation of the dominator tree algorithm for control-flow graphs, based on the Lengauer-Tarjan method. This change adds the \Dominators\ struct and associated public API (such as \immediate\_dominator\) to compute which basic blocks dominate others in MIR. The implementation includes optimizations for small path graphs and uses preorder indices for efficient traversal, replacing previous approaches. Tests verify correctness against standard graph structures like diamonds and complex loops.

_compiler/rustc\_data\structures/src/graph/dominators · high confidence

Introduce Rust-based CI tooling (citool) for job orchestration and analysis

The CI infrastructure now includes a new Rust-based tool (\citool\) that replaces previous shell-based logic for determining which jobs to run on pull requests, try builds, and auto-merges. This tool loads job definitions from \src/ci/github-actions/jobs.yml\, enforces the invariant that PR jobs must be a subset of auto jobs, and provides local execution capabilities for developers. Additionally, \citool\ integrates with GitHub Actions to fetch job metadata (durations, summaries) and uploads CPU usage metrics to Datadog, while also generating a test dashboard to visualize test execution across jobs.

src/ci · high confidence

Introduce SnapshotMap for reversible key-value storage

Added a new \SnapshotMap\ data structure in \compiler/rustc\_data\_structures\ that wraps a hash map with an undo log, allowing users to create snapshots, commit changes, and rollback to previous states. This enables reversible modifications to compiler data structures without manual tracking of changes.

_compiler/rustc\_data\_structures/src/snapshot\map · high confidence

Introduce SsoHashMap and SsoHashSet for small-collection optimization

The compiler now provides \SsoHashMap\ and \SsoHashSet\ in \rustc\_data\_structures\ to optimize performance for collections that typically remain small. These types store elements in a fixed-size array (defaulting to 8 elements) to avoid heap allocation overhead, automatically migrating to a standard \FxHashMap\/\FxHashSet\ when the size exceeds this threshold. \SsoHashSet\ is implemented as a wrapper around \SsoHashMap\, and both types expose a subset of the standard library's map and set APIs, including iteration, insertion, removal, and capacity management.

_compiler/rustc\_data\structures/src/sso · high confidence

Introduce \`rustc\_public\` as a stable public API for compiler introspection

The \rustc\_public\ crate provides a stable, semver-guaranteed interface for third-party tools (such as linters, verification engines, and code generators) to query Rust compiler internals, including type information, MIR bodies, monomorphized instances, and ABI details. It is structured as a public-facing crate (\rustc\_public\) that translates stable data structures into calls against an internal bridge (\rustc\_public\_bridge\) which interfaces with the unstable compiler. Users access this via the \run!\ macro, which sets up the compiler session and allows queries within a callback, supporting features like crate discovery, function and ADT inspection, and MIR body analysis.

_compiler/rustc\public · high confidence

Introduce \`rustc\_sanitizers\` crate for LLVM CFI and KCFI support

The new \rustc\_sanitizers\ crate centralizes compiler support for LLVM Control Flow Integrity (CFI) and Kernel Control Flow Integrity (KCFI). It provides type metadata identifier generation using Itanium C++ ABI mangling, allowing Rust types to be encoded for cross-language CFI checks. The crate also implements a sanitizer ignorelist mechanism, enabling users to exclude specific functions or code sections from sanitization via special case lists.

_compiler/rustc\sanitizers · high confidence

Introduce \`ty::Value\` and \`ValTree\` as the type-system representation for constant values

The compiler now uses a new \ty::Value\ type, which pairs a type with a \ValTree\ (a tree of \ty::Const\ nodes), to represent typed, fully evaluated constant values within the type system. This replaces previous approaches where constants were handled via separate type and value representations. The \ValTree\ structure supports leaf nodes for scalar integers (\ScalarInt\) and branch nodes for aggregates, enabling more robust handling of constants in pattern matching, const generics, and const evaluation. Helper methods like \try\_to\_bits\, \try\_to\_bool\, and \try\_to\_raw\_bytes\ allow safe extraction of underlying data from these values.

_compiler/rustc\middle/src/ty/consts · high confidence

Introduce baked ICU locale data for list formatting

The new \rustc\_baked\_icu\_data\ crate embeds pre-generated ICU4X locale data directly into the compiler binary. This provides built-in support for list formatting in the following locales: English, Spanish, French, Italian, Japanese, Portuguese, Russian, Turkish, Simplified Chinese, and Traditional Chinese. The data is generated from CLDR and included as static constants, ensuring these locales are available without external dependencies.

_compiler/rustc\_baked\_icu\data/src · high confidence

Introduce canonicalization infrastructure for type inference queries

The \rustc\_middle\ crate now includes a new \canonical\ module that implements the canonicalization logic required for type inference queries. This change introduces structures such as \OriginalQueryValues\, \QueryResponse\, and \CanonicalParamEnvCache\, which allow the compiler to replace inference variables with canonical variables for query keys and subsequently map query results back to the original context. This infrastructure is essential for the new trait solver to handle type inference queries correctly.

_compiler/rustc\middle/src/infer · high confidence

Introduce dedicated \`rustc\_parse\_format\` crate for format string parsing

The compiler now uses a new, standalone \rustc\_parse\_format\ crate to parse format strings for \format\_args!\, \asm!\, and diagnostic attributes. This change extracts the parsing logic into its own module, allowing it to compile on stable Rust and providing improved diagnostics, such as better suggestions for positional arguments, raw identifiers, and format specifier ordering. The crate defines specific data structures for format pieces, arguments, and specifications, along with comprehensive tests for parsing behavior.

_compiler/rustc\_parse\format · high confidence

Introduce dedicated diagnostics module for inference errors

The \rustc\_infer\ crate now includes a new \diagnostics.rs\ module that defines structured diagnostic types for inference errors, such as \OpaqueHiddenTypeDiag\. This change centralizes error reporting definitions within the inference engine, allowing for more precise and maintainable error messages for users encountering opaque type issues during type checking.

_compiler/rustc\infer/src · high confidence

Introduce hashed symbol mangling version to shorten symbol names

The compiler now supports a new hashed symbol mangling scheme (accessible via \-C symbol-mangling-version=hashed\) that replaces full symbol paths with a digest, significantly shortening symbol names to avoid linker limits. This new mode is implemented in \compiler/rustc\_symbol\_mangling\ alongside the existing legacy and v0 manglers, featuring a dedicated \hashed.rs\ module for the hashing logic and an \export.rs\ module providing ABI-stable hashing for types used in the mangling process.

_compiler/rustc\_symbol\mangling · high confidence

Introduce new MIR optimization and validation passes

The \rustc\_mir\_transform\ crate has been restructured to include a suite of new MIR passes. Key additions include \AddCallGuards\ to break critical edges for call terminators (ensuring correct handling of LLVM invoke instructions), \AddMovesForPackedDrops\ to handle alignment requirements for packed struct fields, \Subtyper\ to make subtyping explicit in MIR, \CheckAlignment\ to insert runtime checks for pointer alignment, and \CheckForceInline\ to validate \\#\[rustc\_force\_inline\]\ usage. These changes improve MIR correctness, enable more aggressive optimizations, and provide better diagnostics for inline failures.

_compiler/rustc\_mir\transform/src · high confidence

Introduce new diagnostic argument and message infrastructure

The \rustc\_error\_messages\ crate now includes a new \diagnostic\_impls\ module that implements the \IntoDiagArg\ trait for a wide range of standard and compiler-specific types (such as \Edition\, \ParseIntError\, \Backtrace\, and various numeric types). This allows these types to be directly interpolated into diagnostic messages. Additionally, the crate defines the \DiagMessage\ enum to support both static strings and inline Fluent identifiers, and introduces the \MultiSpan\ struct to manage primary spans, span labels, and context spans for error reporting.

_compiler/rustc\_error\messages · high confidence

Introduce new graph data structures and algorithms in rustc\_data\_structures

This change introduces a new graph module within \rustc\_data\_structures\, providing foundational traits (\DirectedGraph\, \Successors\, \Predecessors\, \StartNode\) and concrete implementations for graph operations. Users gain access to a \ReversedGraph\ wrapper to invert edge directions, a \ControlFlowGraph\ trait alias for common compiler graph patterns, and standalone functions for cycle detection (\is\_cyclic\) and depth-first search (\depth\_first\_search\, including an undirected variant). The module also includes internal test infrastructure via \TestGraph\ to validate these graph algorithms.

_compiler/rustc\_data\structures/src/graph · high confidence

Introduce portable-simd crate with SIMD vector types and operations

The \core\_simd\ crate is added to provide a portable, architecture-independent SIMD abstraction. It introduces the \Simd\<T, N\>\ vector type and associated mask types, implementing standard arithmetic, bitwise, and comparison operators (including assignment variants and implicit deref support) via compiler intrinsics. The API includes traits for numeric operations on floats (\SimdFloat\) and integers (\SimdInt\, \SimdUint\), supporting casting, reduction operations (sum, product, min, max), and element-wise math. To aid adoption, the release includes example implementations for dot products, n-body simulations, and spectral norms, alongside documentation explaining the portable nature of the abstraction.

_library/portable-simd/crates/core\simd · high confidence

Introduce pure Rust libm implementation in compiler-builtins

This change adds a new \libm\ crate within \compiler-builtins\ that provides a pure-Rust implementation of standard C math functions (such as \sin\, \cos\, \exp\, \log\, \sqrt\, and \fma\) for \f32\ and \f64\. The implementation includes a generic \Libm\ helper trait and architecture-specific optimizations for x86 (SSE2/FMA), aarch64 (NEON), ARM (VFP), LoongArch, and WebAssembly, ensuring correct and performant behavior across diverse hardware platforms while maintaining \no\_std\ compatibility.

library/compiler-builtins/libm · high confidence

Introduce query-based delayed bug trigger for incremental compilation testing

The compiler now exposes a specific query, \trigger\_delayed\_bug\, within the \rustc\_middle::util\ module. This query allows code inside the query system to intentionally trigger a delayed bug diagnostic, a capability added specifically to test the interaction between delayed bugs and the incremental compilation system. The \util\ module also consolidates query, extern query, and hook providers into a single \Providers\ struct.

_compiler/rustc\middle/src/util · high confidence

Introduce rustc\_graphviz library for generating Graphviz DOT output

Adds the new \rustc\_graphviz\ crate, which provides a library for generating Graphviz DOT files from labeled graph structures. Users can implement the \Labeller\ and \GraphWalk\ traits on their own data types to render graphs, supporting features like node/edge labels, styles, and different label text formats (escaped, HTML, or plain strings). The crate includes comprehensive tests to verify correct DOT generation for various graph configurations.

_compiler/rustc\graphviz · high confidence

Introduce rustc\_public\_bridge as a stable abstraction layer for rustc internals

The \rustc\_public\_bridge\ crate has been introduced to serve as the rustc-side implementation of the \rustc\_public\ API, replacing the previous \stable\_mir\/\rustc\_smir\ naming. This change establishes a bridge that abstracts rustc's internal queries and memory allocation logic behind stable traits (such as \Bridge\, \CompilerCtxt\, and \Tables\), allowing the public \rustc\_public\ interface to remain stable despite internal compiler changes. The bridge handles the translation of internal rustc types (like \DefId\, \Ty\, and \Allocation\) into stable representations, effectively decoupling the public API from the volatile internals of the compiler.

_compiler/rustc\_public\bridge · high confidence

Introduce rustc\_thread\_pool as an internal fork of rayon-core

The compiler now includes its own internal copy of the rayon-core thread-pool implementation under \compiler/rustc\_thread\_pool\. This module provides the core parallel execution primitives (\join\, \scope\, \broadcast\, \spawn\) and thread-pool management used by the compiler, decoupling the compiler's threading behavior from the external \rayon-core\ crate. The implementation includes work-stealing logic, latch-based synchronization, and compile-fail tests to ensure safe usage of parallel closures.

_compiler/rustc\_thread\pool · high confidence

Introduce safe transmutability analysis in rustc\_transmute

The new \rustc\_transmute\ crate provides a deterministic finite automaton (DFA)-based analysis to determine whether one type's memory layout can be safely reinterpreted as another. It converts type layouts into tree structures of bytes and references, prunes destination paths that may carry safety invariants (unless the \Assume::safety\ option is enabled), and compares the resulting automata to produce an \Answer\ (Yes, No, or conditional). This analysis is exposed via the \TransmuteTypeEnv::is\_transmutable\ method and the \Assume\ struct, which allows callers to delegate checks for alignment, lifetimes, safety, and validity.

_compiler/rustc\transmute · high confidence

Introduce shared harness for validating and updating auto-generated stdarch files

Added the \stdarch-gen-common\ crate, which provides a unified check-and-bless harness for stdarch code generators. This tool allows developers to verify that generated files match their committed versions (Check mode) or automatically update the committed files to match the generator's output (Bless mode). It identifies generated files via a specific marker comment, ensures they are formatted with a unified \rustfmt\ configuration, and reports detailed diffs or errors when mismatches occur, streamlining the maintenance of auto-generated architecture-specific code.

library/stdarch/crates/stdarch-gen-common · high confidence

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

A new standalone binary, \proc-macro-srv-cli\, is introduced to handle procedural macro expansion via an RPC client-server architecture over stdio. This separation isolates proc-macro dynamic libraries from the main rust-analyzer process, preventing segfaults in macros from crashing the IDE. The binary supports two protocol formats: the existing \json-legacy\ and a new \bidirectional-postcard-prototype\ format, which enables bidirectional communication for features like file method requests. It requires the \in-rust-tree\ feature (or \RUSTC\_BOOTSTRAP=1\) to access unstable rustc internals and is intended for internal use, requiring the \RUST\_ANALYZER\_INTERNALS\_DO\_NOT\_USE\ environment variable to run.

src/tools/rust-analyzer/crates/proc-macro-srv-cli · high confidence

Introduce standalone rustc\_arena crate

The arena allocator implementation has been extracted into a new, standalone \compiler/rustc\_arena\ crate, separating it from its previous location in \libarena\. This new crate provides \TypedArena\ and \DroplessArena\ allocators with optimized chunk management, strict provenance handling, and comprehensive test coverage including drop-count verification and Miri compatibility.

_compiler/rustc\arena · high confidence

Introduce standalone rustc\_lexer crate with frontmatter and Unicode 17 support

The \rustc\_lexer\ crate has been extracted into a standalone, reusable library that operates directly on \&str\ to produce simple tokens without reporting errors, separating pure lexing from rustc-specific concerns like spans and interning. This change introduces support for frontmatter (RFC 3503) and guarded string literals (RFC 3593), updates Unicode identifier handling to version 17, and adds new token kinds such as \Frontmatter\, \RawLifetime\, \ForcedKeywordIdent\, and \GuardedStrPrefix\. The lexer now handles emojis in identifiers, raw lifetimes, and frontmatter parsing, while removing the previous \cursor\ module and simplifying token structures.

_compiler/rustc\lexer · high confidence

Introduce the new trait solver crate with core solving infrastructure

This change adds the \rustc\_next\_trait\_solver\ crate, which contains the implementation of the next-generation trait solver. The crate provides the core solving infrastructure, including a new \Canonicalizer\ for separating goals from their context to enable caching, a \SolverDelegate\ trait to abstract over inference context operations, and modules for coherence checks, normalization, and placeholder handling. This serves as the foundational layer for the new trait solving logic, replacing or uplifting components from the existing solver.

_compiler/rustc\_next\_trait\solver · high confidence

Introduce virtual file system (VFS) abstraction for path resolution and file tracking

The \vfs\ crate now provides a dedicated virtual file system layer that manages file paths, content changes, and file sets independently of the host operating system. It introduces \VfsPath\ to handle both real and virtual paths, \AnchoredPath\ for resolving relative paths relative to a source file, and \FileSet\ to partition files into disjoint sets based on path prefixes. The system tracks file changes (create, modify, delete) with content hashing to detect modifications, and integrates with the \salsa\ incremental computation engine to trigger re-analysis when files change. This abstraction allows rust-analyzer to correctly process paths across different platforms and virtual environments, such as generated code or test fixtures.

src/tools/rust-analyzer/crates/vfs · high confidence

Introduction of dedicated Hash64 and Hash128 types for stable hashing

The compiler now exposes new \Hash64\ and \Hash128\ types in the \rustc\_hashes\ crate to represent 64-bit and 128-bit hashes produced by a \StableHasher\. These types are designed to ensure fixed-size encoding (avoiding the variable-length varint encoding that occurs when hashes are stored as raw integers), which results in more compact and stable binary representations across compiler versions. They also provide utility functions and prevent accidental extraction of inner values as integers, ensuring that hash data is handled consistently and efficiently during serialization.

_compiler/rustc\hashes · high confidence

Introduction of the rustc\_llvm crate with new FFI and build infrastructure

The \rustc\_llvm\ crate has been introduced to centralize LLVM integration, featuring a new build script that parses \llvm-config\ output using \shlex\ and declares supported LLVM components (such as x86, arm, aarch64, and bpf) via \cargo:rustc-check-cfg\. The library provides an opaque \RustString\ extern type to enable safe C++-to-Rust string writing without \improper\_ctypes\ warnings, and includes an \initialize\_available\_targets\ function that conditionally initializes LLVM targets based on the components detected at build time.

_compiler/rustc\llvm · high confidence

Lint for refining RPITIT bounds in trait implementations

The compiler now checks that implementations of trait methods with Return Position Impl Trait In Trait (RPITIT) do not refine the trait's signature by narrowing the bounds on the opaque type. If an implementation provides stricter bounds than the trait definition, the compiler emits a lint (split into \refining\_impl\_trait\_reachable\ for public traits and \refining\_impl\_trait\_internal\ for private ones). This check is skipped for unreachable traits or when errors are present, and it ensures that the hidden type in the implementation remains an opaque alias consistent with the trait's declaration.

_compiler/rustc\_hir\_analysis/src/check/compare\_impl\item · high confidence

Musl math library integration for compiler-builtins

The musl-math-sys crate now builds the musl math library as a static library during compilation, replacing the previous submodule approach with a download script. This change introduces a build system that compiles musl C source files, applies platform-specific patches (such as weak symbol handling for Apple and MinGW), and exposes safe Rust bindings for a wide range of mathematical functions including trigonometric, exponential, and logarithmic operations. The integration ensures compatibility across various target architectures and environments by configuring the C compiler flags and handling symbol prefixes appropriately.

library/compiler-builtins/crates/musl-math-sys · high confidence

New \#\[rustc\_dump\_inferred\_outlives\] attribute for debugging lifetime bounds

Developers can now annotate items with the \\#\[rustc\_dump\_inferred\_outlives\]\ attribute to debug the compiler's lifetime inference. When this attribute is present on a free item (such as a struct, enum, union, or checked type alias), the compiler emits a diagnostic listing all inferred outlives clauses (e.g., \T: 'a\ or \'a: 'b\) required for that item. This aids in understanding and verifying the implicit lifetime constraints generated during HIR analysis.

_compiler/rustc\_hir\analysis/src/outlives · high confidence

New ADT type info implementation for const evaluation

The const evaluation engine now includes a dedicated module for handling ADT (Algebraic Data Type) type information. This change introduces logic to write ADT type info, including variant indices for structs, unions, and enums, as well as methods to serialize generic arguments (lifetimes, types, and constants) into the const evaluation context. This enables more accurate reflection and type introspection during compile-time evaluation.

_compiler/rustc\_const\_eval/src/const\_eval/type\info · high confidence

New CLI subcommands and rustc wrapper for batch analysis and debugging

The rust-analyzer binary now exposes several new command-line subcommands for batch processing and debugging: \analysis-stats\ (type-checks a project and prints summary statistics), \diagnostics\ (scans for errors and exits with a non-zero code if found), \parse\ (prints the syntax tree or JSON representation of stdin), \highlight\ (outputs HTML highlighting), \lsif\ (generates LSIF indices), \scip\ (generates SCIP indices), \run-tests\ and \rustc-tests\ (runs tests via the MIR interpreter), \prime-caches\ (primes the analysis cache for benchmarking), \unresolved-references\, \ssr\ (structured search/replace), and \search\. Additionally, a \rustc\_wrapper\ mode is introduced: when the \RUSTC\_WRAPPER\ environment variable points to the rust-analyzer binary, it intercepts \cargo check\ calls to skip actual crate checking (returning success) while still allowing build scripts and proc-macros to run, facilitating faster IDE startup. A \build.rs\ script is also added to embed commit hash, short hash, and date into the binary for version reporting.

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

New IDE database utilities and core data structures

The \ide-db\ crate now includes foundational components for the IDE layer: \active\_parameter.rs\ provides logic to identify the active parameter in function calls and generic arguments for features like signature help; \apply\_change.rs\ adds transactional state management and a memory usage diagnostic for the \RootDatabase\; \assists.rs\ centralizes the \Assist\ data structure and \AssistKind\ enums shared with \ide\_diagnostics\; \defs.rs\ defines the unified \Definition\ enum for symbol resolution; \documentation.rs\ standardizes doc comment retrieval; \famous\_defs.rs\ offers helpers to locate standard library items; and \helpers.rs\ adds utilities for path-to-AST conversion and definition lookup.

src/tools/rust-analyzer/crates/ide-db · high confidence

New IDE diagnostics for Rust language errors and lints

Rust Analyzer now provides IDE diagnostics for a wide range of Rust language errors and lints, including E0730 (array patterns without fixed length), E0728 (await outside async), E0040 (explicit drop), E0062 (duplicate fields), E0726 (elided lifetimes in paths), E0529 (expected array/slice pattern), E0618 (expected function), E0033 (cannot deref trait object), E0608 (cannot index), E0109 (prohibited generic args), E0735 (generic default refers to Self), E0210 (incoherent impl), and the \inactive\_code\ lint for cfg-disabled code. These diagnostics are marked as stable by default and include quick-fixes for several cases, such as replacing explicit \drop\ calls with the \drop\ function, removing prohibited generic arguments, and renaming identifiers to follow Rust naming conventions.

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

New LLVM offload wrapper for GPU device code bundling

Added a new C++ library (RustOffload) and build configuration in the compiler's LLVM wrapper layer to handle GPU offloading. This component provides the LLVMRustBundleImages function, which replaces the previous reliance on the external clang-offload-packager binary by directly bundling device bitcode into offload binaries using LLVM's native offload utilities. It also includes an offload mapper for function cloning and support for assembling PTX code via ptxas, enabling the compiler to generate device binaries without invoking external JIT or packager tools.

_compiler/rustc\llvm/llvm-wrapper/offload · high confidence

New LinkedGraph data structure for incremental graph construction

The compiler now includes a new \LinkedGraph\ implementation in \rustc\_data\_structures\. This structure supports incremental addition of nodes and edges with custom data types, storing edges in a central array while threading them into linked lists for efficient iteration of incoming and outgoing edges. It is designed for diagnostic and debugging code, with a caution that new code should prefer \VecGraph\ or custom implementations.

_compiler/rustc\_data\_structures/src/graph/linked\graph · high confidence

New MIR dataflow analysis crate

The compiler now includes a dedicated \rustc\_mir\_dataflow\ crate that provides the framework and implementations for MIR dataflow analyses. This adds support for tracking drop flags, precise liveness, and transitive liveness (including debug info and borrowed locals), and exposes a \rustc\_peek\ intrinsic for sanity-checking these analyses during compilation. The crate also provides utilities for pretty-printing MIR with dataflow annotations and managing move-path data.

_compiler/rustc\_mir\dataflow/src · high confidence

New MIR dataflow analysis implementations for liveness and storage tracking

The \rustc\_mir\_dataflow\ crate now includes new implementations for key dataflow analyses: \MaybeBorrowedLocals\ tracks which locals are potentially borrowed (ignoring fake borrows), \MaybeLiveLocals\ performs backward live-variable analysis, \MaybeInitializedPlaces\ and \MaybeUninitializedPlaces\ track place initialization states, \MaybeStorageLive\/\MaybeStorageDead\ track storage annotations, and \MaybeRequiresStorage\ determines if a local's storage is observable. A new \precise\_liveness\ analysis computes exact allocation points using a sparse interval matrix. These analyses are exported from \impls/mod.rs\ and form the basis for optimizations like dead store elimination and precise liveness tracking.

_compiler/rustc\_mir\dataflow/src/impls · high confidence

New MIR reduction strategies for fuzzing

Added a new \reduce.rs\ module to the GCC codegen fuzzing infrastructure that implements specific MIR reduction strategies. These include removing duplicate assignments, eliminating unnecessary \dump\_var\ calls, converting specific match patterns to unconditional jumps, and replacing block bodies with abort calls to safely prune unreachable code during fuzzing.

_compiler/rustc\_codegen\_gcc/build\system/src/fuzz · high confidence

New ObligationForest utility for tracking trait resolution obligations

The \rustc\_data\_structures\ crate now includes an \ObligationForest\ data structure to manage outstanding trait obligations during compilation. This utility tracks pending obligations and their dependency backtraces, allowing the compiler to process them incrementally and handle cycles or errors gracefully. It also provides a debug feature to dump the obligation graph as Graphviz output when the \DUMP\_OBLIGATION\_FOREST\_GRAPHVIZ\ environment variable is set, aiding in the visualization of complex trait resolution paths.

_compiler/rustc\_data\_structures/src/obligation\forest · high confidence

New THIR visitor implementation with comprehensive expression and pattern traversal

The \compiler/rustc\middle/src/thir/visit.rs\ file introduces a new \Visitor\ trait and associated \walk\\*\ helper functions for the THIR (Typed High-Level Intermediate Representation). This change provides a structured way to traverse THIR nodes, including expressions (\ExprKind\), statements, blocks, arms, and patterns (\PatKind\). The visitor handles a wide variety of expression kinds such as \ByUse\, \Deref\, \PointerCoercion\, \Become\, \LoopMatch\, \UnsafeBinder\ operations, and inline assembly operands, ensuring that all relevant sub-nodes are visited. It also explicitly notes that \ty::Const\ and \mir::Const\ are not visited automatically due to lazy constant creation, requiring manual handling via other visitor methods. This infrastructure supports subsequent compiler passes that need to inspect or transform THIR structures.

_compiler/rustc\middle/src/thir · high confidence

New VFS notification subsystem for file watching

A new \vfs-notify\ crate has been added to handle file system watching and Virtual File System (VFS) loading. This component implements the \loader::Handle\ interface using the \notify\ and \walkdir\ crates to monitor directories and files. It introduces a background actor that processes configuration changes and file events, allowing the editor to react to file system modifications. This provides the underlying mechanism for real-time file watching capabilities within rust-analyzer.

src/tools/rust-analyzer/crates/vfs-notify · high confidence

New VecGraph data structure with optional predecessor support

Added a new \VecGraph\ implementation in \rustc\_data\_structures\ that provides an efficient directed graph structure optimized for pre-existing node indices. The graph stores outgoing edges by default and offers an opt-in mode (via the \BR\ generic parameter) to also store incoming edges, enabling efficient retrieval of predecessors. This change introduces the core graph storage logic and associated unit tests for node counting, successor/predecessor retrieval, and depth-first search traversal.

_compiler/rustc\_data\_structures/src/graph/vec\graph · high confidence

New YAML-based generator for ARM/AArch64 intrinsics

The \stdarch-gen-arm\ crate has been introduced to replace the previous ARM intrinsic generation logic. It uses YAML specification files (e.g., \neon/aarch64.spec.yml\, \sve/aarch64.spec.yml\) to define intrinsic signatures, attributes, and compositions, which are then processed by a Rust generator to produce the final intrinsic code and tests. This change adds the generator tooling, its documentation, and the specification files for NEON, SVE, and SVE2, establishing a new declarative approach for maintaining ARM architecture intrinsics.

library/stdarch/crates/stdarch-gen-arm · high confidence

New \`newtype\_index\` macro with explicit attribute-driven trait derivation

The \rustc\_index\_macros\ crate introduces the \newtype\_index\ procedural macro, which generates index wrapper types for use with \IndexVec\. Users can now explicitly control derived traits via attributes: \\#\[stable\_hash\]\ for stable hashing, \\#\[encodable\]\ for serialization, \\#\[orderable\]\ for \Ord\/\PartialOrd\ and \Step\ implementation, and \\#\[debug\_format\]\ for custom debug output. The macro also supports \\#\[max\]\ for niche optimizations and \\#\[gate\_rustc\_only\]\ to restrict certain implementations to nightly builds.

_compiler/rustc\_index\macros · high confidence

New \`util\` CLI tool for evaluating and classifying math operations

A new \util\ crate has been added to the compiler-builtins workspace, providing a command-line interface for developers to evaluate math functions (via \eval\ or \x\ subcommands) and classify floating-point inputs (via \print\ or \p\ subcommands). This tool supports multiple backends including libm, musl, and MPFR, and allows parsing of f16, f32, f64, and f128 types to inspect their properties such as NaN, infinity, and exponent values.

library/compiler-builtins/crates/util · high confidence

New assert-instr-macro crate for verifying generated assembly instructions

A new \assert-instr-macro\ crate has been added to the \stdarch\ library to provide the \\#\[assert\_instr\]\ procedural macro. This tool allows developers to write tests that assert specific functions generate the expected machine instructions. The macro generates test shims that call the target function and verifies the output assembly against a specified instruction string, supporting features like const and type generics, custom argument values, and platform-specific ABI handling (such as forcing \sysv64\ on Windows x86\_64). It also respects optimization levels and can be disabled via the \STDARCH\_DISABLE\_ASSERT\_INSTR\ environment variable.

library/stdarch/crates/assert-instr-macro · high confidence

New autodiff and GPU offload codegen modules

The LLVM codegen builder now includes dedicated modules for automatic differentiation (autodiff) and GPU offloading. The autodiff module implements argument matching and activity adjustment for Enzyme, handling complex types like slices and zero-sized types (ZST) by mapping Rust-level arguments to LLVM-level shadow arguments and using global constants for metadata. The GPU offload module introduces infrastructure for launching kernels on devices, including declarations for OpenMP runtime functions like \\_\_tgt\_target\_kernel\ and \omp\_get\_num\_devices\, generation of offload metadata entries, and support for passing workgroup/thread dimensions as intrinsic arguments.

_compiler/rustc\_codegen\llvm/src/builder · high confidence

New build-system tooling for ABI verification, benchmarking, and sysroot management

The cg\_clif build system now includes dedicated modules for running the abi-cafe ABI verification suite, benchmarking compilation and execution performance of a sample raytracer using hyperfine, and managing custom sysroot builds with support for cross-compilation targets (aarch64, s390x, riscv64, Windows) via QEMU/Wine runners. It also integrates stdarch tests for aarch64 with specific intrinsic skip lists and provides a structured test runner for coretests, alloctests, and example programs.

_compiler/rustc\_codegen\_cranelift/build\system · high confidence

New builtin macro implementations for alloc\_error\_handler, assert, asm, autodiff, cfg, and more

The compiler now includes new, dedicated source files in \compiler/rustc\_builtin\_macros/src\ for handling several built-in macros and attributes. This adds support for \\#\[alloc\_error\_handler\]\ to generate allocator error handling shims, a rewritten \assert!\ macro that uses edition-specific panic paths and supports generic assertions, and a refactored \asm!\ macro with improved argument validation and error reporting. It also introduces the \\#\[autodiff\]\ attribute for automatic differentiation via LLVM Enzyme, new \cfg!\, \\#\[cfg\_accessible\]\, \\#\[cfg\_eval\]\, and \cfg\_select!\ macros for compile-time configuration evaluation, and implementations for \compile\_error!\, \concat!\, \concat\_bytes!\, and \contracts\ (requires/ensures). These changes consolidate and modernize the implementation of these core language features within the compiler.

_compiler/rustc\_builtin\macros/src · high confidence

New builtins-test crate for integration and fuzz testing

A new \builtins-test\ crate has been added to provide integration and fuzz testing for \compiler-builtins\. It includes a fuzzing framework with edge-case and randomized testing for integer and floating-point operations, benchmarking infrastructure to compare compiler-builtins against system symbols and assembly implementations, and memory-allocation utilities (\AlignedSlice\) to test memory functions like \memcpy\, \memset\, \memmove\, and \strlen\ with various alignments and overlaps.

library/compiler-builtins/builtins-test · high confidence

New cfg crate for parsing and evaluating conditional compilation attributes

Rust Analyzer now includes a dedicated \cfg\ crate that parses \\#\[cfg(...)\]\ attributes into a structured \CfgExpr\ representation and evaluates them against a set of enabled configuration options (\CfgOptions\). This new component supports standard conditional compilation logic, including \all\, \any\, and \not\ combinators, as well as key-value pairs like \target\_os = "linux"\. It also provides utilities to convert expressions into Disjunctive Normal Form (DNF) and to generate hints for enabling inactive code, improving the accuracy of conditional compilation handling within the editor.

src/tools/rust-analyzer/crates/cfg · high confidence

New compiler passes for canonical symbols, export stability, and debugger visualizers

The compiler now includes dedicated passes in \rustc\_passes\ to validate and collect specific attribute-based features. It enforces that \\#\[rustc\_canonical\_symbol\]\ attributes on foreign items are unique within a crate, emitting errors for duplicates. It introduces \\#\[export\_stable\]\ to mark items as part of a stable public API, checking that they are public and correctly placed. Additionally, it adds support for \\#\[debugger\_visualizer\]\ to embed debugger visualizer files (like PDBs) directly into the compiled output, handling file resolution and error reporting for unreadable files.

_compiler/rustc\passes · high confidence

New debug assertions for incremental compilation dependency graphs

The \rustc\_incremental\ crate now includes a new \assert\_dep\_graph\ pass and associated diagnostics to help debug incremental compilation. This pass allows developers to use \\#\[rustc\_if\_this\_changed\]\ and \\#\[rustc\_then\_this\_would\_need\]\ annotations in their code to verify that specific paths exist in the dependency graph. When enabled via the \-Z query-dep-graph\ flag, the compiler will check these annotations after codegen and emit errors if the expected dependencies are missing or if assertions about node cleanliness (clean/dirty) fail. This provides a targeted way to test and validate incremental compilation behavior without relying solely on full graph dumps.

_compiler/rustc\incremental/src · high confidence

New debugging dumps for region inference state and constraints

The \region\_infer\ module now includes dedicated files to visualize the internal state of the Non-Lexical Lifetimes (NLL) region inference engine. When the compiler is invoked with \-Zdump-mir=nll\, it generates annotated MIR output showing the free region mapping, inferred region values, and all outlives constraints. Additionally, Graphviz diagrams are produced to render the raw region constraint graph and the Strongly Connected Components (SCC) graph, helping developers diagnose complex lifetime errors by visualizing how regions are related and grouped during inference.

_compiler/rustc\_borrowck/src/region\infer · high confidence

New derive macros for type visitation, folding, and lifting in rustc\_type\_ir

The \rustc\_type\_ir\_macros\ crate now provides \\#\[derive(TypeVisitable\_Generic)\]\, \\#\[derive(TypeFoldable\_Generic)\]\, and \\#\[derive(Lift\_Generic)\]\ to automatically implement type traversal and transformation traits for compiler internal representations. These macros handle generic parameter bounds and support attributes like \\#\[type\_visitable(ignore)\]\ and \\#\[type\_foldable(identity)\]\ to customize behavior for specific fields, enabling safer and more consistent handling of type structures within the compiler.

_compiler/rustc\_type\_ir\macros · high confidence

New development and debugging tooling for the Cranelift codegen backend

The \compiler/rustc\_codegen\_cranelift/scripts\ directory now includes a suite of helper scripts to improve the development workflow for the Cranelift backend. \rustc-clif\ and \rustdoc-clif\ act as wrappers to invoke the compiler and documentation generator using the Cranelift backend, automatically handling sysroot and backend path configuration. \filter\_profile.rs\ provides a Rust-based tool to filter and trim stack-collapse profiles, removing noise from unrelated compiler phases to focus on codegen performance. \jit-helpers.py\ adds GDB integration to resolve JIT-compiled function names in backtraces. Additionally, \setup\_rust\_fork.sh\ and \test\_rustc\_tests.sh\ automate the setup of an isolated Rust source tree and the execution of the rustc test suite against the Cranelift backend, explicitly managing test exclusions for unsupported features like variadic arguments, LTO, and inline assembly.

_compiler/rustc\_codegen\cranelift/scripts · high confidence

New diagnostic attributes for customizing compiler error messages

The compiler now supports a suite of new \\#\[diagnostic::...\]\ attributes that allow library authors to customize error messages for specific scenarios. These include \\#\[diagnostic::on\_unimplemented\]\ for trait implementation errors, \\#\[diagnostic::on\_move\]\ for move errors, \\#\[diagnostic::on\_const\]\ for const evaluation errors, \\#\[diagnostic::on\_unknown\]\ for unknown item errors, \\#\[diagnostic::on\_unmatched\_args\]\ for macro argument mismatches, \\#\[diagnostic::on\_type\_error\]\ for type errors, \\#\[diagnostic::do\_not\_recommend\]\ to suppress suggestion lints, and \\#\[diagnostic::opaque\]\ to hide implementation details. Most of these are gated behind nightly features (e.g., \diagnostic\_on\_move\, \diagnostic\_on\_const\) and allow specifying custom \message\, \note\, and \label\ text to improve the clarity of compiler diagnostics.

_compiler/rustc\_attr\parsing/src/attributes/diagnostic · high confidence

New garbage-collected interning infrastructure for symbols and interned values

The \intern\ crate now provides a new global interning system that supports both traditional reference-counted interning and a new garbage-collected (GC) mode. In GC mode, interned values and symbols are not freed immediately when their last reference is dropped; instead, a mark-and-sweep garbage collector tracks live references and reclaims unreachable memory in parallel. This infrastructure introduces \Interned\, \InternedRef\, \InternedSlice\, and \InternedSliceRef\ types, along with a \Symbol\ type that uses a compact tagged pointer representation to efficiently handle both static and dynamic strings. The GC is triggered via \GarbageCollector::collect()\ and is designed to reduce memory pressure and allocation overhead for large-scale analysis workloads.

src/tools/rust-analyzer/crates/intern · high confidence

New generic derive macro implementation framework

The compiler now uses a new generic framework in \rustc\_builtin\_macros/src/deriving/generic\ to generate \derive\ implementations for traits like \Clone\, \Copy\, \PartialEq\, and \Debug\. This framework abstracts the boilerplate of handling different struct and enum variant types (structs, tuple structs, enums with matching variants, and static methods), automatically managing type parameters, lifetimes, and field access. It replaces the previous ad-hoc derivation logic with a unified system that constructs AST instances for derived methods, improving consistency and maintainability of built-in derive macros.

_compiler/rustc\_builtin\macros/src/deriving/generic · high confidence

New graph iteration utilities in rustc\_data\_structures

The \rustc\_data\_structures\ crate now exposes a new \graph::iterate\ module providing iterative graph traversal algorithms. This includes \post\_order\_from\ and \reverse\_post\_order\ for generating node ordering, and a \DepthFirstSearch\ iterator that supports multiple start nodes, tracks visited status, and allows chaining. These utilities replace previous recursive or less flexible implementations, offering a more robust and reusable API for graph-based compiler passes.

_compiler/rustc\_data\structures/src/graph/iterate · high confidence

New index-based collections and bitsets in rustc\_index

The \rustc\_index\ crate now provides \IndexVec\ and \IndexSlice\, which allow elements to be accessed only via a specific associated index type (generated by \newtype\_index!\) rather than raw \usize\. This prevents mixing indexes for different domains at compile time and improves type safety for compiler data structures. The crate also introduces \DenseBitSet\ for fixed-size bit operations, \IntervalSet\ for storing sorted, non-adjacent intervals, and \ChunkedBitSet\ for memory-efficient bitsets with chunked storage. These types replace previous implementations like \HybridBitSet\ and \GrowableBitSet\ in many contexts, offering optimized operations for dataflow analysis and other compiler passes.

_compiler/rustc\index/src · high confidence

New intrinsic-test tool for validating SIMD intrinsics

Added a new \intrinsic-test\ crate that generates and runs equivalent C and Rust programs for SIMD intrinsics to verify that both produce identical results from random inputs. The tool supports ARM (NEON, SVE, SVE2) and x86 architectures, parsing intrinsic definitions from JSON metadata, generating test code, and comparing outputs. It includes architecture-specific modules for handling type definitions, argument parsing, and compiler flags, along with skip-list files for known issues in various compilers (Clang, GCC, ICX) and targets (including big-endian AArch64 and LoongArch64).

library/stdarch/crates/intrinsic-test · high confidence

New load-cargo crate for loading Cargo projects into rust-analyzer

A new \load-cargo\ crate has been added to provide a stable API for loading a Cargo project into a static analysis database without support for incremental changes. This module exposes \load\_workspace\_at\ and \load\_workspace\ functions, along with a \LoadCargoConfig\ struct that allows users to configure proc-macro server selection (sysroot, explicit path, or disabled), cache prefilling, and worker thread counts. It serves as the entry point for external tools to run rust-analyzer as a library, handling the initialization of the VFS, crate graph construction, and proc-macro expansion setup.

src/tools/rust-analyzer/crates/load-cargo · high confidence

New macro expansion infrastructure in hir-expand

The \hir-expand\ crate has been restructured to introduce a new, modular system for handling macro expansion. This includes a new \attrs.rs\ module for robust attribute lowering and \cfg\_attr\ expansion, a \builtin\ module that centralizes built-in macro support (including new \attr\_macro.rs\ and \derive\_macro.rs\ for handling procedural and derive macros), and dedicated modules for declarative (\declarative.rs\) and eager (\eager.rs\) macro expansion. This refactoring improves how rust-analyzer processes and expands macros, providing better hygiene, error handling, and support for modern Rust features like macros 2.0 and new built-in attributes.

src/tools/rust-analyzer/crates/hir-expand · high confidence

New procedural macros for function enumeration and type generation

The \libm-macros\ crate now provides \\#\[function\_enum\]\ and \\#\[base\_name\_enum\]\ to automatically generate enums representing math functions and their base names, along with a \for\_each\_function\ macro that iterates over all available operations. This allows consumers to programmatically access function metadata, generate tests, and handle type-specific logic without manual boilerplate.

library/compiler-builtins/crates/libm-macros · high confidence

New profiling crate with CPU, memory, and instruction counters

The \profile\ crate now provides concrete tools for measuring rust-analyzer performance. It introduces \StopWatch\ to track elapsed time, CPU instructions (via Linux perf counters on x86/x86\_64/aarch64), and memory usage (using jemalloc, Linux mallinfo/mallinfo2, or Windows ProcessMemoryInfo). It also adds \CpuSpan\ for Google CPU profiling (gperftools) when the \cpu\_profiler\ feature is enabled, automatically generating an SVG profile report upon scope exit.

src/tools/rust-analyzer/crates/profile · high confidence

New public API for borrow-checker consumers

The \rustc\_borrowck\ crate now exposes a public \consumers\ module that allows external tools to retrieve borrow-checking results. This includes the \get\_bodies\_with\_borrowck\_facts\ function, which computes and returns \BodyWithBorrowckFacts\ containing the MIR body, the \BorrowSet\ (with \BorrowData\ and \TwoPhaseActivation\ details), the \RegionInferenceContext\, and optional Polonius input/output facts. The \BorrowSet\ itself is now a distinct, documented struct with public methods for iterating borrows and querying their locations, activation states, and associated locals, enabling consumers like Aquascope and Creusot to analyze borrow lifetimes and conflicts without relying on internal compiler queries.

_compiler/rustc\borrowck/src · high confidence

New rustc\_driver\_impl crate with shell argfile support and syntax highlighting

The compiler driver has been reorganized into the new \rustc\_driver\_impl\ crate, which now includes support for shell-style argument files (via the \-Zshell-argfiles\ flag) to allow complex command-line arguments to be passed more easily. Additionally, \rustc --explain\ output now features syntax highlighting for Rust code blocks, improving readability of compiler documentation.

_compiler/rustc\_driver\impl · high confidence

New rustc\_fs\_util crate with robust path and temp directory handling

The compiler now includes a new \rustc\_fs\_util\ library that provides utilities for file system operations. It introduces \try\_canonicalize\, which falls back to \std::path::absolute\ if standard canonicalization fails, and \fix\_windows\_verbatim\_for\_gcc\, which strips verbatim path prefixes to work around MSVCRT bugs on Windows. Additionally, \TempDirBuilder::tempdir\_in\ now implements a retry loop with backoff to handle intermittent 'Access is denied' errors on Windows during temporary directory creation.

_compiler/rustc\_fs\util · high confidence

New rustc\_log crate for external debug logging

A new \rustc\_log\ crate has been added to allow external tools and debuggers to initialize and configure Rust compiler logging without depending on the heavy \rustc\_driver\ dependency tree. Users can now enable debug logs by depending on \rustc\_log\ and calling \init\_logger\ with environment variables (such as \LOG\, \LOG\_COLOR\, \LOG\_JSON\, \LOG\_OUTPUT\_TARGET\, etc.) to control filtering, output format (hierarchical or JSON), coloring, and log file destinations.

_compiler/rustc\log · high confidence

New rustdoc-json-types crate with optional rkyv support

The rustdoc JSON types have been extracted into a standalone crate (\src/rustdoc-json-types\) to allow independent versioning and distribution without depending on rustc internals. This crate exposes the public API for the \--output-format json\ flag, including the \Crate\ root struct and all item types, with a \FORMAT\_VERSION\ of 61. It includes a new \rkyv\_0\_8\ feature flag that enables zero-copy deserialization via rkyv, allowing tools to analyze the JSON structure without full deserialization overhead. The crate also supports \rustc-hash\ for performance optimization and includes comprehensive roundtrip tests for serde, postcard, and rkyv serialization.

src/rustdoc-json-types · high confidence

New shared build\_helper library for bootstrap and tools

The \src/build\_helper\ directory now provides a shared library of types and functions used across the build system and related tools. This includes CI environment detection and GitHub Actions log grouping, filesystem helpers like \recursive\_remove\ and \remove\_and\_create\_dir\_all\, git utilities for checking path modifications and upstream commits, a \DropBomb\ mechanism to ensure commands are executed, npm/yarn installation support, stage0 configuration parsing, and metrics logging for bootstrap steps. This centralizes common build infrastructure logic previously scattered or duplicated.

_src/build\helper · high confidence

New span and syntax context infrastructure in the span crate

The \span\ crate now provides the core types for representing code locations and macro hygiene, introducing \Span\ (combining text range, anchor, and syntax context), \SpanAnchor\, and \EditionedFileId\ (bundling file ID with Rust edition). It adds \AstIdMap\ for generating stable IDs for syntax nodes to improve incremental analysis, and implements \SyntaxContext\ machinery for tracking macro expansion hierarchies and hygiene. Additionally, \SpanMap\ and \RealSpanMap\ are introduced to map between text ranges and span data, with \SpanMap\ supporting asynchronous dropping to reduce main-thread contention.

src/tools/rust-analyzer/crates/span · high confidence

New stdarch-verify crate for validating intrinsic signatures

The \stdarch-verify\ crate has been added to the standard library distribution. It provides a build-time verification system that checks the signatures of architecture-specific intrinsics (x86, ARM, MIPS) against their definitions and, for x86, against the Intel Intrinsics Guide XML. This ensures that Rust intrinsic declarations match their expected types, return values, and required target features, catching mismatches early in the build process.

library/stdarch/crates/stdarch-verify · high confidence

New stdx utility modules for type-safe maps, assertions, and thread management

The stdx crate now includes several new modules: a vendored \anymap\ implementation for type-safe storage of one value per type, recoverable \always!\ and \never!\ assertion macros that log errors instead of panicking in release builds, a \NamedTempFile\ implementation that uses OS-specific deletion-on-close semantics, and a thread pool with explicit \ThreadIntent\ (Worker or LatencySensitive) to map to platform QoS APIs. These additions provide safer concurrency primitives, better debugging context for panics, and more robust temporary file handling.

src/tools/rust-analyzer/crates/stdx · high confidence

New strongly connected components (SCC) algorithm with annotation support

The \rustc\_data\_structures\ crate now includes a new \scc\ module implementing Tarjan's algorithm to compute strongly connected components of a graph in O(n) time. This addition allows users to not only identify SCCs but also to annotate them with commutative data (such as min/max values) during the computation. The module provides a public \Sccs\ struct and traits (\Annotation\, \Annotations\) to facilitate this, along with utilities to iterate over SCCs in dependency order and construct the reverse graph of the SCC DAG.

_compiler/rustc\_data\structures/src/graph/scc · high confidence

New structured completion modules for attributes, dot access, and expressions

The \ide-completion\ crate has been reorganized into a modular structure, introducing dedicated completion handlers for attributes (including \cfg\, \derive\, \diagnostic\, \feature\, \lint\, \macro\_use\, and \repr\), dot-access completions (fields, methods, and smart \await\/\iter\ skipping), and expression path completions. This change also adds completions for Cargo environment variables within \env!\ and \option\_env!\ macros, as well as extern ABI strings. Users will see more context-aware and structured suggestions in these areas, with improved handling of derive dependencies, lint qualifiers, and smart iterator/await completions.

src/tools/rust-analyzer/crates/ide-completion · high confidence

New synchronization primitives: FreezeLock, conditional Lock, and parallel execution helpers

The \rustc\_data\_structures::sync\ module now includes several new types to improve concurrency and performance. \FreezeLock\ allows data to be mutated under a lock and then permanently frozen for lock-free, shared access. \Lock\ provides conditional synchronization, using no synchronization overhead when thread safety is not required. Parallel execution is now handled by the \parallel\ submodule, which uses \rustc\_thread\_pool\ for operations like \par\_fns\, \par\_join\, and \par\_for\_each\_in\, ensuring consistent execution order between serial and parallel modes. Additionally, \WorkerLocal\ has been moved here from the rayon fork, and \AppendOnlyVec\/\AppendOnlyIndexVec\ provide efficient, append-only data structures for thread-local or lock-free scenarios.

_compiler/rustc\_data\structures/src/sync · high confidence

New test fixture utility crate for rust-analyzer tests

The \test-fixture\ crate has been introduced to provide high-level utility methods for setting up test databases from fixture strings. This allows rust-analyzer tests to define project setups using a specific syntax (including file paths, crate definitions, dependencies, editions, and cursor markers) without depending on the entire Rust sysroot, simplifying the creation and maintenance of internal tests.

src/tools/rust-analyzer/crates/test-fixture · high confidence

New test runner and output formatters in libtest

The \library/test\ crate has been restructured with a new test runner architecture, introducing dedicated modules for command-line argument parsing (\cli.rs\), console output handling (\console.rs\), and a pluggable formatter system (\formatters/\). This change adds support for multiple output formats, including a new JUnit XML formatter (\junit.rs\) alongside existing JSON, pretty, and terse modes, and introduces benchmarking capabilities via \bench.rs\ with a \Bencher\ API and \black\_box\ hint. The runner now supports features like test shuffling (\helpers/shuffle.rs\), concurrency control (\helpers/concurrency.rs\), and metric tracking (\helpers/metrics.rs\), providing users with more flexible and structured test output options.

library/test · high confidence

New test utilities for fixtures, benchmarks, and performance validation

The \test-utils\ crate now includes a \Fixture\ system for defining multi-file, multi-crate test environments via metadata comments, a \bench\_fixture\ module to generate large synthetic Rust code for performance testing, and an \AssertLinear\ tool to validate that benchmark measurements follow linear scaling rather than quadratic growth.

src/tools/rust-analyzer/crates/test-utils · high confidence

New trait solver infrastructure in rustc\_middle

The compiler now includes a new trait solver implementation within \rustc\_middle::traits\. This introduces a new candidate selection model (\SelectionCandidate\) that explicitly distinguishes between various implementation sources, including new candidates for async closures, coroutines, and iterator traits. The solver utilizes a new caching mechanism (\WithDepNodeCache\) for candidate selection and evaluation, and restructures query types to support canonicalization and normalization of unnormalized aliases. Additionally, the specialization graph has been updated to support new overlap modes for negative coherence testing.

_compiler/rustc\middle/src/traits · high confidence

Refactor debuginfo module with safe wrappers and GDB visualizer embedding

The debuginfo generation code has been restructured to improve safety and add new capabilities. A new \DIBuilderBox\ type now safely owns the LLVM \DIBuilder\ instance, and a \DIBuilderExt\ trait provides safe wrapper methods for FFI calls, reducing the need for unsafe code in the compiler. Additionally, the compiler now supports embedding GDB pretty printers defined via the \\#\[debugger\_visualizer\]\ attribute directly into the binary's \.debug\_gdb\_scripts\ section, allowing debuggers to automatically load these visualizers without external configuration.

_compiler/rustc\_codegen\llvm/src/debuginfo · high confidence

Rust parser rewritten with new event-driven architecture and frontmatter support

The parser in \crates/parser\ has been completely rewritten to use a new event-driven architecture (\event.rs\) that decouples the parsing algorithm from the syntax tree representation, improving maintainability and performance. This change introduces native support for RFC 3503 frontmatter, allowing Rust files to include YAML-style metadata blocks (e.g., for Cargo dependencies) which are parsed and exposed as distinct nodes. The new grammar implementation (\grammar.rs\ and submodules) also brings updated support for modern Rust features, including \gen\ blocks, \super let\ statements, \impl\ restrictions, and improved error recovery for malformed code.

src/tools/rust-analyzer/crates/parser · high confidence

Rust-analyzer now supports Rust 2024 edition

The edition module has been updated to include \Edition2024\ as the latest and current supported edition, alongside the existing 2015, 2018, and 2021 editions. This enables rust-analyzer to correctly parse and analyze code targeting the Rust 2024 language version, including handling edition-specific syntax and semantics.

src/tools/rust-analyzer/crates/edition · high confidence

Stabilize Rust 2024 edition and introduce future edition support

The compiler now includes the Rust 2024 edition as a stable option, making it the new latest stable edition. A new 'future' edition variant has been added to the Edition enum to allow testing and gating of upcoming language features before they are assigned to a concrete edition year. This change updates the edition parsing logic and configuration to recognize 2024 as stable while keeping the future edition unstable.

_compiler/rustc\span · high confidence

Structural Search and Replace (SSR) assist added

The IDE now supports Structural Search and Replace, allowing you 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)\) and triggering the assist. The implementation handles path resolution, UFCS method calls, and nested matches within the current workspace or selection.

src/tools/rust-analyzer/crates/ide-ssr · high confidence

Support for async drop via new destructor and poll shims

The compiler now generates specific MIR shims to handle async drop semantics. A new \async\_destructor\_ctor.rs\ module introduces \build\_async\_drop\_shim\ to create glue code for async drop operations, \build\_future\_drop\_poll\_shim\ to manage the \future\_drop\_poll\ method for coroutines, and \build\_async\_destructor\_ctor\_shim\ to construct async destructor constructors. These changes enable the runtime to correctly execute async drop logic for types that require it, distinguishing between sync and async drop requirements and handling nested async drop scenarios.

_compiler/rustc\_mir\transform/src/shim · high confidence

Support for const-testing in simd\_test macro

The \\#\[simd\test\]\ macro now detects if the wrapped test function is marked \const\. When a const test is used, the macro generates a \const \: () = unsafe { ... }\ block to evaluate the function at compile time, allowing users to verify that SIMD intrinsics are const-stable. This enables compile-time validation of intrinsic behavior in addition to the existing runtime feature detection and execution.

library/stdarch/crates/simd-test-macro · high confidence

Windows resource metadata added to rustc\_driver and crate restructured for parallel compilation

On Windows MSVC targets, the rustc\_driver binary now includes embedded version and file description metadata via a new build script, improving how the library is identified in the OS. Additionally, the rustc\_driver crate has been restructured to act as a thin re-export layer for rustc\_driver\_impl, enabling parallel compilation of the underlying implementation crate.

_compiler/rustc\driver · high confidence

Architecture

ABI layout logic moved to rustc\_abi

The internal implementation for computing type layouts, including coroutine layout, simple scalar/struct layouts, and type introspection, has been moved from the compiler into the \rustc\_abi\ crate. This refactoring centralizes ABI layout logic, introducing new modules like \coroutine.rs\ and \simple.rs\ within \rustc\_abi/src/layout\ to handle specific layout calculations and type interface implementations.

_compiler/rustc\abi/src/layout · high confidence

Compiler middle layer refactored into new modular files

The \rustc\_middle::middle\ module has been reorganized into distinct, focused files including \codegen\_fn\_attrs\, \dead\_code\, \debugger\_visualizer\, \deduced\_param\_attrs\, \dependency\_format\, \exported\_symbols\, \lang\_items\, \privacy\, \region\, \resolve\, \resolve\_bound\_vars\, and \stability\. This change introduces new data structures and queries for code generation attributes, effective visibility tracking, region scope trees, name resolution results, and stability/deprecation metadata, providing a cleaner separation of concerns within the compiler's middle layer.

_compiler/rustc\middle/src/middle · high confidence

Const-eval engine restructured into modular sub-components

The constant evaluation engine in \rustc\_const\_eval\ has been reorganized from a single monolithic module into a set of distinct, focused files. This change introduces a \DummyMachine\ for lightweight constant evaluation, a \dyn\_trait\ module to handle dynamic trait type information, a dedicated \error\ module for const-eval-specific error kinds and reporting, and separate query modules (\eval\_queries\ and \fn\_queries\) for evaluation logic and constness checks. Additionally, \type\_info\ and \valtrees\ are now standalone modules, reflecting a shift toward using valtrees as the internal representation for constant values and improving the modularity of the interpreter's machine implementation.

_compiler/rustc\_const\_eval/src/const\eval · high confidence

Extract crate store interface into dedicated rustc\_crate\_store crate

The crate store interface and its associated types (such as CrateSource, NativeLib, and ExternCrate) have been moved from rustc\_session into a new, standalone crate named rustc\_crate\_store. This refactoring isolates the metadata access layer, making the crate store a distinct component within the compiler architecture.

_compiler/rustc\_crate\store · high confidence

GCC backend intrinsics refactored into modular source files

The \rustc\_codegen\_gcc\ intrinsic implementation has been reorganized from a single monolithic file into a modular structure (\mod.rs\, \llvm.rs\, \simd.rs\, \archs.rs\, \old\_archs.rs\). This change improves maintainability by separating architecture-specific mappings, LLVM intrinsic translations, and SIMD logic, while preserving the existing code generation behavior for users.

_compiler/rustc\_codegen\gcc/src/intrinsic · high confidence

HIR crate refactored into modular submodules

The \hir\ crate has been restructured by splitting its implementation into dedicated modules (\attrs\, \db\, \diagnostics\, \display\, \from\_id\, \has\_source\, \semantics\, etc.), replacing the previous monolithic layout. This change improves code organization and maintainability without altering the public API or user-facing behavior.

src/tools/rust-analyzer/crates/hir · high confidence

Introduce \`rustc\_abi\` crate for centralized ABI and layout handling

The compiler now uses a new \rustc\_abi\ crate to centralize type layout calculation, ABI definitions, and calling convention logic. This change introduces core types such as \LayoutData\, \ExternAbi\, and \CanonAbi\, and moves layout computation logic (including SIMD and coroutine handling) into this module. It also adds support for new calling conventions like \RustTail\ and \RustPreserveNone\, and refactors how heterogeneous aggregates and niche optimizations are computed, providing a unified interface for ABI reasoning across targets and codegen backends.

_compiler/rustc\abi/src · high confidence

Introduce new AST pretty-printing module structure

The \rustc\_ast\_pretty\ crate has been reorganized into a new modular structure under \pprust\, splitting the implementation into \mod.rs\ (public API), \state.rs\ (core printing logic and comment handling), and \tests.rs\. This change introduces a new \State\-based printing architecture that handles AST-to-string conversion for items, expressions, patterns, and tokens, while also improving comment preservation by distinguishing between doc comments and regular comments during pretty-printing.

_compiler/rustc\_ast\pretty/src/pprust · high confidence

Introduce rustc\_type\_ir as the core type system abstraction layer

The compiler's type representation has been restructured around a new \rustc\_type\_ir\ crate, which defines the foundational data structures for the type system. This includes the \Ty\, \Const\, and \Region\ kinds, along with their associated \Kind\ enums (e.g., \ConstKind\, \TyKind\), binder handling (\Binder\), and canonicalization logic (\Canonical\). The diff establishes the \Interner\ trait, which abstracts over the specific compiler context, allowing the type system to be decoupled from the global \TyCtxt\. This change also introduces new data structures like \DelayedMap\ for optimized caching and \TypeFlags\ for efficient type property tracking, laying the groundwork for the new trait solver and improved type inference performance.

_compiler/rustc\_type\ir · high confidence

Legacy Polonius fact generation moved to a dedicated legacy module

The code responsible for generating Datalog facts for the \-Zpolonius=legacy\ implementation has been reorganized into a new \compiler/rustc\_borrowck/src/polonius/legacy\ module. This change consolidates fact emission logic—covering variable accesses, loan invalidations, loan kills, and outlives constraints—into dedicated files (\accesses.rs\, \loan\_invalidations.rs\, \loan\_kills.rs\, \facts.rs\, \location.rs\), separating it from the main borrow checker while maintaining support for the legacy Polonius engine.

_compiler/rustc\borrowck/src/polonius/legacy · high confidence

MIR builder module reorganized into builder submodules

The \rustc\_mir\_build\ module has been restructured from a single \build\ module into a \builder\ module containing dedicated submodules (\block.rs\, \cfg.rs\, \coverageinfo.rs\, \misc.rs\, \mod.rs\, \scope.rs\). This change improves code organization and resolves GitHub's 'Go to file' navigation issues by avoiding the ambiguous 'build' directory name, while preserving the existing MIR building functionality.

_compiler/rustc\_mir\build/src/builder · high confidence

MIR expression builder refactored into modular sub-files

The expression-lowering logic in the MIR builder has been reorganized from a single large module into distinct, focused files (as\_constant, as\_operand, as\_place, as\_rvalue, as\_temp, category, into, and stmt). This structural change improves code maintainability and clarity by separating concerns for different expression categories (constants, operands, places, rvalues, and statements) without altering the external compiler behavior.

_compiler/rustc\_mir\build/src/builder/expr · high confidence

MIR type-checking logic restructured into modular sub-components

The MIR type-checking pass in \rustc\_borrowck\ has been refactored from a single monolithic module into several focused sub-modules (\canonical\, \constraint\_conversion\, \free\_region\_relations\, \input\_output\, \relate\_tys\). This change reorganizes how region constraints are generated, converted, and related to types, improving the internal structure of the borrow checker without altering the external behavior of the compiler.

_compiler/rustc\_borrowck/src/type\check · high confidence

Major refactoring of HIR type-checking into modular subsystems

The HIR type-checking logic in \rustc\_hir\_typeck\ has been reorganized into distinct modules (\autoderef\, \cast\, \demand\, etc.) to improve code structure and maintainability. This change introduces dedicated handling for auto-dereferencing adjustments, comprehensive type-checking for cast expressions (including pointer, numeric, and enum casts), and a unified system for emitting type mismatch and coercion suggestions. Users benefit from more structured internal compiler logic, which supports ongoing improvements to error messages and type inference without altering public language semantics.

_compiler/rustc\_hir\typeck/src · high confidence

Monomorphization logic moved to a dedicated \`rustc\_monomorphize\` crate

The monomorphization subsystem has been extracted from the compiler core into a new, standalone crate (\compiler/rustc\_monomorphize\). This change reorganizes the monomorphization code into distinct modules: \collector\ (for discovering mono items), \partitioning\ (for grouping items into codegen units), \diagnostics\ (for error reporting), and \util\ (for profiling helpers). This structural shift decouples the monomorphization logic from the rest of the compiler, improving modularity and maintainability without altering the user-facing compilation behavior.

_compiler/rustc\monomorphize · high confidence

Move trait resolution queries to rustc\_traits

The \rustc\_traits\ crate now provides the query implementations for key trait resolution operations, including codegen candidate selection, coroutine hidden types, dropck outlives, obligation evaluation, implied outlives bounds, and various normalization and type operation queries. This refactors the compiler by extracting these independent trait resolution methods from the main solver code into a dedicated module, ensuring they are properly registered and accessible via the query provider system.

_compiler/rustc\traits · high confidence

New rustc\_ast\_ir crate for shared AST utilities

The compiler introduces a new \rustc\_ast\_ir\ crate that consolidates common utilities previously scattered across \rustc\_ast\ and \rustc\_type\_ir\. This crate now provides shared type definitions for integer (\IntTy\), unsigned integer (\UintTy\), and floating-point (\FloatTy\) types, along with visitor utilities and macros (such as \try\_visit\, \visit\_opt\, and \walk\_list\) to streamline AST traversal. This change is part of a broader effort to reduce dependencies between compiler crates, specifically allowing \rustc\_ast\ to avoid depending on \rustc\_type\_ir\ for these shared components.

_compiler/rustc\_ast\ir · high confidence

Overhaul of the query system internals and caching infrastructure

The query system in \rustc\_middle\ has been significantly refactored to improve performance and reduce code size. Query values are now fully erased in in-memory caches to minimize generic instantiations during codegen, using a new \Erasable\ trait and \Erased\ storage type. The caching infrastructure has been restructured with specialized cache implementations (\DefIdCache\, \SingleCache\, \DefaultCache\) and a new \arena\_cached\ module to efficiently handle large query results. Additionally, the query execution plumbing has been updated with new wrapper types like \TyCtxtEnsureOk\ and \TyCtxtEnsureDone\ to optimize side-effect-only query calls, and the on-disk cache serialization has been streamlined.

_compiler/rustc\middle/src/query · high confidence

Redesigned HIR lowering and attribute handling in hir-def

The hir-def crate has been refactored to improve memory efficiency and performance. Attribute handling now uses a compact \AttrFlags\ bitflag system to avoid storing full syntax for common attributes, with data extraction deferred to specific queries only when needed. Documentation extraction has been moved to a dedicated \docs\ submodule that builds a concatenated string with a source map for accurate link resolution and highlighting. Builtin derives are no longer fully expanded; instead, they are recorded as unexpanded impls to save time and memory. The expression store has been split into types and expressions, and the \Body\ structure now wraps an \ExpressionStore\ with a source map, separating parameter patterns from the main body. These changes optimize the internal representation of Rust code for the IDE.

src/tools/rust-analyzer/crates/hir-def · high confidence

Refactor HIR type lowering into a modular subsystem

The \astconv\ module has been renamed to \hir\_ty\_lowering\ and split into dedicated submodules (\bounds\, \cmse\, \dyn\_trait\, \errors\, \generics\, and \mod\). This restructuring organizes the logic for lowering HIR type-system entities (types, lifetimes, constants, and trait bounds) into the internal \rustc\_middle::ty\ representation, improving maintainability without changing user-facing behavior.

_compiler/rustc\_hir\_analysis/src/hir\_ty\lowering · high confidence

Refactor MIR basic block storage to include cached control-flow graphs

The MIR body's basic block storage has been refactored into a new \BasicBlocks\ type that embeds a shared, lazily-computed cache for control-flow graph (CFG) data. This cache tracks predecessors, reverse postorder (RPO) traversal, and dominators, using an \Arc\ to allow efficient sharing when cloning MIR bodies (e.g., during borrow checking). The change introduces methods to access these cached structures and to invalidate them when the CFG is mutated, while also providing a safe path to mutate block data without invalidating the cache if the structure remains unchanged. Additionally, the module now includes dedicated support for coverage instrumentation metadata and generic graphviz/graph generation utilities for MIR debugging.

_compiler/rustc\middle/src/mir · high confidence

Refactor THIR building into modular components

The THIR (Typed High-level Intermediate Representation) building logic in \rustc\_mir\_build\ has been restructured into separate modules (\block.rs\, \expr.rs\, \mod.rs\) and the context struct has been renamed to \ThirBuildCx\. This change improves code organization and maintainability by separating the concerns of block/stmt lowering, expression lowering, and the main build context, without altering the resulting THIR output or user-facing behavior.

_compiler/rustc\_mir\build/src/thir/cx · high confidence

Refactor type inference context into modular submodules

The \rustc\_infer\ type inference engine has been reorganized into distinct modules (\at\, \context\, \free\_regions\, \freshen\, \projection\, \resolve\, \solver\_region\_constraints\, \type\_variable\, \unify\_key\) to improve code structure and maintainability. This change introduces a new \at\ interface for creating subtype and equality relationships, refactors the \InferCtxt\ to implement \rustc\_type\_ir::InferCtxtLike\, and separates concerns such as free region tracking, type freshening for caching, and variable resolution into their own files. Users will see no direct behavioral change, but the internal organization supports better isolation of inference logic and easier future maintenance.

_compiler/rustc\infer/src/infer · high confidence

Refactored HIR analysis collection into modular sub-files

The \rustc\_hir\_analysis::collect\ module has been restructured by splitting its monolithic implementation into distinct, focused files: \clauses\_of.rs\ (handling explicit and inferred type clauses), \generics\_of.rs\ (managing generic parameter definitions and inheritance), \item\_bounds.rs\ (collecting and filtering item bounds), \resolve\_bound\_vars.rs\ (resolving early vs. late-bound lifetimes), \type\_of.rs\ (lowering types for various HIR nodes), and \dump.rs\ (debugging attributes). This change improves code organization and maintainability without altering the external behavior of the compiler.

_compiler/rustc\_hir\analysis/src/collect · high confidence

Refactored function context type-checking into modular sub-components

The \rustc\_hir\_typeck\ function context (\FnCtxt\) has been reorganized from a single large implementation file into distinct modules (\\_impl\, \checks\, \suggestions\, \arg\_matrix\, \adjust\_fulfillment\_errors\, \inspect\_obligations\). This refactoring improves code maintainability and separation of concerns within the compiler's type-checking logic, specifically isolating argument checking, fulfillment error adjustment, and diagnostic suggestions into their own files.

_compiler/rustc\_hir\_typeck/src/fn\ctxt · high confidence

Refactored method lookup and error reporting into a dedicated module

The method lookup logic in \rustc\_hir\_typeck\ has been reorganized into a new \method\ sub-module containing \probe.rs\ (candidate search), \confirm.rs\ (receiver adjustment and validation), \suggest.rs\ (error messages and suggestions), and \prelude\_edition\_lints.rs\ (edition-specific collision lints). This structural change consolidates the machinery for finding methods, handling autoderefs, and generating diagnostics, while introducing lints for prelude collisions such as \try\_into\ (Rust 2021) and \poll\/\into\_future\ (Rust 2024).

_compiler/rustc\_hir\typeck/src/method · high confidence

Refactored project-model crate into modular source files

The project-model crate has been reorganized from a single large source file into distinct modules (build\_dependencies, cargo\_config\_file, cargo\_workspace, env, manifest\_path, project\_json, sysroot, and tests). This structural change improves code maintainability and separation of concerns without altering the external API or user-facing behavior of rust-analyzer's project loading and configuration.

src/tools/rust-analyzer/crates/project-model · high confidence

Refactored type relation logic into a new \`relate\` submodule

The type inference system's core relation logic has been reorganized into a new \compiler/rustc\_infer/src/infer/relate\ module. This change introduces dedicated submodules for generalization (\generalize.rs\), higher-ranked type handling (\higher\_ranked.rs\), lattice operations (\lattice.rs\), and type relating (\type\_relating.rs\). For users, this represents an internal restructuring of how the compiler checks type compatibility and infers types, aiming to improve code maintainability and clarity without altering external behavior.

_compiler/rustc\infer/src/infer/relate · high confidence

Restructure AST pretty-printing logic into modular state files

The AST pretty-printing implementation in \rustc\_ast\_pretty\ has been refactored by extracting expression, item, and fixup context logic into dedicated modules (\expr.rs\, \item.rs\, \fixup.rs\). This change improves the maintainability of the pretty-printer by separating concerns, such as isolating the \FixupContext\ struct which handles complex parenthesization rules for statement boundaries, match arms, and conditions. Users will see no functional change, but the internal structure is now more organized for future enhancements to syntax representation.

_compiler/rustc\_ast\pretty/src/pprust/state · high confidence

Restructured borrow-checker diagnostics into modular submodules

The borrow-checker diagnostic logic in \rustc\_borrowck\ has been reorganized from a monolithic structure into distinct, focused modules: \bound\_region\_errors\, \conflict\_errors\, \explain\_borrow\, \move\_errors\, \mutability\_errors\, \opaque\_types\, and \region\_errors\. This refactoring separates concerns for specific error types (such as move errors, mutability violations, and region/lifetime constraints) and introduces helper modules for finding local uses and explaining borrow contexts, improving code maintainability and clarity for compiler developers.

_compiler/rustc\borrowck/src/diagnostics · high confidence

Restructured coherence checks into modular sub-components

The coherence validation logic in \rustc\_hir\_analysis\ has been refactored from a monolithic structure into distinct modules (\builtin\, \inherent\_impls\, \inherent\_impls\_overlap\, \orphan\, and \unsafety\). This change organizes the specific checks for built-in traits (like \Copy\, \Unpin\, and \Drop\), inherent impl overlap, orphan rules, and safety requirements into separate files, improving maintainability without altering the underlying validation behavior.

_compiler/rustc\_hir\analysis/src/coherence · high confidence

Restructured match-lowering into a modular pipeline

The match-lowering logic in \rustc\_mir\_build\ has been refactored from a single monolithic file into a dedicated \matches\ module with specialized submodules (\buckets\, \match\_pair\, \test\, \user\_ty\, \util\). This change introduces an intermediate \InterPat\ representation to better handle or-patterns and refutable/irrefutable distinctions, and implements lazy construction of user-type projections to reduce cloning overhead. The new structure also adds dedicated logic for partitioning candidates into buckets based on tests (such as variant switches, integer switches, and string equality) and improves handling of fake borrows for match guards.

_compiler/rustc\_mir\build/src/builder/matches · high confidence

Rust LLVM backend refactors FFI bindings and introduces dynamic offload support

The LLVM codegen backend has been restructured to improve safety and maintainability. The \conversions.rs\ module now provides explicit traits (\FromGeneric\/\ToGeneric\) to safely convert backend-independent types (like \AtomicOrdering\ and \DebugInfo\) to LLVM FFI types, replacing implicit or unsafe conversions. The \ffi.rs\ module introduces safe wrapper types for LLVM booleans and raw enums to prevent undefined behavior when LLVM returns unexpected values. Additionally, new modules \enzyme\_ffi.rs\ and \offload\_ffi.rs\ implement dynamic loading for the Enzyme autodiff library and GPU offloading tools via \libloading\, allowing these features to be loaded at runtime from the sysroot rather than being statically linked.

_compiler/rustc\_codegen\llvm/src/llvm · high confidence

Rust LLVM wrapper codebase reorganized into rustc\_llvm

The Rust compiler's LLVM integration code has been moved from the \rustllvm\ directory into the \rustc\_llvm\ crate. This change consolidates the C++ wrapper layer, including the new \CoverageMappingWrapper\ for coverage data, the \PassWrapper\ for LLVM optimization pipelines, and the \RustWrapper\ for core FFI bindings, into a single, unified location. Users benefit from a cleaner project structure that better reflects the compiler's internal module organization.

_compiler/rustc\llvm/llvm-wrapper · high confidence

Rust codegen backend interface restructured into modular traits

The \rustc\_codegen\ssa\ crate has been refactored to replace the previous monolithic codegen interface with a set of specialized, modular traits. This change introduces distinct trait modules for ABI handling (\abi.rs\), inline and global assembly (\asm.rs\), core backend lifecycle (\backend.rs\), instruction building (\builder.rs\), constants (\consts.rs\), coverage instrumentation (\coverageinfo.rs\), debug information (\debuginfo.rs\), static declarations (\declare.rs\ and \statics.rs\), intrinsics (\intrinsic.rs\), miscellaneous utilities (\misc.rs\), type layout (\type\.rs\), and backend output/LTO (\write.rs\). This modularization allows codegen backends to implement only the specific capabilities they support, such as CFI or specific float types, while providing a cleaner, more maintainable contract for backend developers.

_compiler/rustc\_codegen\ssa/src/traits · high confidence

Rust compiler AST module restructured and stabilized

The \rustc\_ast\ crate has been reorganized into a modular structure with dedicated source files for core AST definitions (\ast.rs\), traits (\ast\_traits.rs\), token handling (\token.rs\, \tokenstream.rs\), and visitor logic (\visit.rs\, \mut\_visit.rs\). This change introduces new internal types such as \FormatArgs\ for parsing \format\_args!()\ macros, \EntryPointType\ for identifying program entry points, and \LazyAttrTokenStream\ for deferring token collection. The module also standardizes AST node visiting orders, replaces legacy \Lrc\ with \Arc\ for thread safety, and implements derive macros for AST visitors to reduce boilerplate.

_compiler/rustc\ast/src · high confidence

Rust compiler HIR module restructured into new files

The \rustc\_hir\ crate has been reorganized into a new modular structure, splitting the High-Level Intermediate Representation (HIR) definitions into dedicated files: \arena.rs\ for memory allocation, \def.rs\ for definition kinds and resolution, \hir.rs\ for core HIR node types, \intravisit.rs\ for the visitor pattern, \lints.rs\ for delayed lint handling, \pat\_util.rs\ for pattern utilities, \stable\_hash\_impls.rs\ for hashing logic, and \target\_impls.rs\ for attribute target conversions. This refactoring improves code organization and maintainability of the compiler's internal representation without changing user-facing behavior.

_compiler/rustc\hir/src · high confidence

Rust compiler feature gates are reorganized into dedicated modules

The compiler's feature-gate definitions have been split from a single monolithic file into four distinct modules: \accepted.rs\ for stabilized features, \unstable.rs\ for active unstable features, \removed.rs\ for deprecated features, and \builtin\_attrs.rs\ for built-in attributes and gated \cfg\ flags. This structural change improves maintainability and clarity of the feature lifecycle without altering the user-facing behavior of any specific feature gate.

_compiler/rustc\feature · high confidence

Rust compiler internal restructuring

The compiler's internal architecture has been reorganized to improve modularity and performance. The \rustc\_middle\ crate now serves as the central hub for common type definitions, including HIR, THIR, MIR, and the type context (\TyCtxt\). A new centralized arena system has been introduced to manage allocations for various compiler data structures, replacing previous ad-hoc approaches. The query system has been overhauled with a new macro-based definition mechanism, enhancing caching and incremental compilation support. Additionally, the diagnostic infrastructure has been refactored, with new types for handling lint levels, expectations, and error reporting, while the stable hashing mechanism for incremental compilation has been updated to better handle spans and definitions.

_compiler/rustc\middle/src · high confidence

Rust compiler macro expansion subsystem rewritten

The macro expansion engine in \rustc\_expand\ has been completely rewritten, introducing new core data structures like \Annotatable\ to handle attributes on all AST nodes, a new \AstFragment\ enum for macro output, and a dedicated \mbe\ module for declarative macro parsing. This refactor modernizes the attribute parsing infrastructure, improves diagnostic quality for macro errors, and restructures module loading and configuration stripping logic.

_compiler/rustc\expand/src · high confidence

Rust compiler query system restructured into rustc\_query\_impl

The compiler's query execution engine has been consolidated into the new \rustc\_query\_impl\ crate, introducing dedicated modules for query vtables (\query\_vtables.rs\, \dep\_kind\_vtables.rs\), execution logic (\execution.rs\), incremental caching (\incremental.rs\), job management (\job.rs\), and cycle error diagnostics (\diagnostics.rs\, \handle\_cycle\_error.rs\). This restructuring centralizes the implementation of query execution, dependency graph integration, and on-disk caching, providing a more modular foundation for the compiler's incremental compilation and query system.

_compiler/rustc\_query\impl · high confidence

Rustc metadata module restructured into new crate

The \rustc\_metadata\ crate has been reorganized into a new, standalone crate with a fresh file structure. This change introduces new modules for handling crate loading (\creader.rs\), dependency format resolution (\dependency\_format.rs\), diagnostics (\diagnostics.rs\), and file system operations (\fs.rs\), among others. The restructure consolidates metadata-related logic, including native library collection (\native\_libs.rs\) and dynamic library loading (\host\_dylib.rs\), into this dedicated crate, improving modularity and separation of concerns within the compiler.

_compiler/rustc\metadata/src · high confidence

THIR constant lowering and printing moved to rustc\_mir\_build

The logic for lowering AST literals to THIR constants (constant.rs) and the utilities for printing THIR structures (print.rs, util.rs) have been relocated into the rustc\_mir\_build crate. This change centralizes the THIR construction and debugging output within the MIR builder, replacing previous implementations that likely resided in rustc\_middle or other compiler crates, and introduces a new lit\_to\_const function that handles various literal types including strings, integers, floats, and byte strings using ValTrees.

_compiler/rustc\_mir\build/src/thir · high confidence

Behavioural changes

101 commits (4 fixes) modifying compiler/rustc\_attr\_ir

A change to existing behaviour in compiler/rustc\_attr\_ir — 101 commits (4 fixs), 14 files: “make AstTarget map 1-1 with Target”; “remove \rustc\_never\_type\_options\ attribute”; “edit check\_lint\_name to accept LintName”; and 98 more.

_compiler/rustc\_attr\ir · medium confidence · unverified

11660 commits (1030 fixes) modifying src/tools

A change to existing behaviour in src/tools — 11660 commits (1030 fixs), 7168 files: “add josh instructions”; “Scope trait TextLen just for primitives”; “statx: complain about invalid flags”; and 10031 more (refs \#125472, \#50113, \#44968, \#117018, \#11070, …).

src/tools · medium confidence · unverified

14 commits (1 fix) modifying compiler/rustc\_hir\_analysis/src/diagnostics

A change to existing behaviour in compiler/rustc\_hir\analysis/src/diagnostics — 14 commits (1 fix), 3 files: “Remove \EmissionGuarantee\”; “Remove \G\ generic param from \Diag\<'\, G\>\”; “Reword label”; and 11 more.

_compiler/rustc\_hir\analysis/src/diagnostics · medium confidence · unverified

19 commits (4 fixes) modifying compiler/rustc\_codegen\_gcc

A change to existing behaviour in compiler/rustc\_codegen\_gcc — 19 commits (4 fixs), 8 files: “Update GCC submodule”; “Fix libgccjit version”; “Prepare for merging from rust-lang/rust”; and 13 more (refs \#957, \#159844, \#164869).

_compiler/rustc\_codegen\gcc · medium confidence · unverified

2 commits (1 fix) modifying library/portable-simd/crates/test\_helpers

A change to existing behaviour in library/portable-simd/crates/test\_helpers — 2 commits (1 fix), 2 files: “cleanup \FlushSubnormals\ implementation”; “Fix ord operations on masks”.

_library/portable-simd/crates/test\helpers · medium confidence · unverified

3161 commits (231 fixes) modifying compiler/rustc\_trait\_selection

A change to existing behaviour in compiler/rustc\_trait\_selection — 3161 commits (231 fixs), 72 files: “Remove deprecated LLVM-style inline assembly”; “Remove OpaqueTyOrigin::Misc, use TyAlias instead”; “Fix outdated crate names in compiler docs”; and 3107 more (refs \#138084, \#157702, \#93893, \#92306, \#79209, …).

_compiler/rustc\_trait\selection · medium confidence · unverified

3163 commits (298 fixes) modifying src/bootstrap

A change to existing behaviour in src/bootstrap — 3163 commits (298 fixs), 171 files: “bootstrap: don't call support\_xz in hot-path”; “Compile run-make recipes using the stage0 compiler”; “Make it possible to build GCC on CI”; and 3108 more (refs \#54811, \#138084, \#137147, \#132772, \#110087, …).

src/bootstrap · medium confidence · unverified

3435 commits (209 fixes) modifying compiler/rustc\_middle/src/ty

A change to existing behaviour in compiler/rustc\_middle/src/ty — 3435 commits (209 fixs), 39 files: “Remove deprecated LLVM-style inline assembly”; “Fix outdated crate names in compiler docs”; “Isolate \CrateNum\ creation to \TyCtxt\ methods”; and 3388 more (refs \#124976, \#93893, \#154808, \#152369, \#79209, …).

_compiler/rustc\middle/src/ty · medium confidence · unverified

36 commits (10 fixes) modifying compiler/rustc\_codegen\_gcc/build\_system/src

A change to existing behaviour in compiler/rustc\_codegen\_gcc/build\_system/src — 36 commits (10 fixs), 14 files: “Remove --exclude-should-panic when running regex tests”; “Fix LLVM commit hash retrieval Use \rust-lang/llvm-project\ repository instead of the official one Return an \Err\ when an \info\ argument doesn't exist”; “resolve: Partially convert \ambiguous\_glob\_imports\ lint into a hard error”; and 33 more (refs \#159844, \#164869).

_compiler/rustc\_codegen\_gcc/build\system/src · medium confidence · unverified

4085 commits (393 fixes) modifying library/std

A change to existing behaviour in library/std — 4085 commits (393 fixs), 658 files: “zkVM: Cache args from host”; “Remove deprecated LLVM-style inline assembly”; “Stabilize try\_reserve”; and 4001 more (refs \#97963, \#126333, \#141925, \#159562, \#140393, …).

library/std · medium confidence · unverified

4992 commits (401 fixes) modifying (repo-wide)

A change to existing behaviour in (repo-wide) — 4992 commits (401 fixs), 31 files: “Change the error message when no LLVM is found”; “Add more ignorable build artifacts”; “Link to a better place for msys2”; and 4569 more (refs \#187, \#6774, \#13147, \#862, \#309, …).

(repo-wide) · low confidence · unverified

5 commits (0 fixes) modifying compiler/rustc\_codegen\_llvm/src/llvm/ffi

A change to existing behaviour in compiler/rustc\_codegen\_llvm/src/llvm/ffi — 5 commits, 1 file: “Move \llvm::Context\ into a new submodule”; “Use an invariant lifetime brand for LLVM values”; “Use an invariant lifetime brand for LLVM types”; and 2 more.

_compiler/rustc\_codegen\llvm/src/llvm/ffi · medium confidence · unverified

5 commits (0 fixes) modifying library/compiler-builtins/crates/api-list-common

A change to existing behaviour in library/compiler-builtins/crates/api-list-common — 5 commits, 1 file: “api-list: Move sort and unique checks to tests”; “test: Move \libm-macros/shared.rs\ to a new \api-list-common\ crate”; “Add exp2m1f16”; and 2 more.

library/compiler-builtins/crates/api-list-common · medium confidence · unverified

5 commits (2 fixes) modifying library/portable-simd/crates/std\_float

A change to existing behaviour in library/portable-simd/crates/std\_float — 5 commits (2 fixs), 1 file: “separate the receiver from arguments in HIR under /clippy”; “cleanup \FlushSubnormals\ implementation”; “Use a faster formulation of swizzle\_dyn\_precise on AVX-512 VBMI”; and 2 more.

_library/portable-simd/crates/std\float · medium confidence · unverified

6740 commits (514 fixes) modifying library/core

A change to existing behaviour in library/core — 6740 commits (514 fixs), 325 files: “Remove deprecated LLVM-style inline assembly”; “fix comment on Allocator trait”; “Made slice sort documentation consistent between stable and unstable versions”; and 6555 more (refs \#94640, \#88715, \#80377, \#119551, \#85462, …).

library/core · medium confidence · unverified

7065 commits (718 fixes) modifying src/doc

A change to existing behaviour in src/doc — 7065 commits (718 fixs), 752 files: “add a line to the example to clarify semantics”; “rustdoc tutorial: grammar change in list comments”; “reference grammar: remove duplicate else\_tail rule”; and 6323 more (refs \#469, \#635, \#788, \#1942, \#1486, …).

src/doc · medium confidence · unverified

8165 commits (918 fixes) modifying src/librustdoc

A change to existing behaviour in src/librustdoc — 8165 commits (918 fixs), 164 files: “Desugar parenthesized generic arguments in HIR”; “remove Clean trait implementation for hir::BareFnTy”; “rustdoc: Show basic type layout information”; and 7995 more (refs \#13148, \#78777, \#124976, \#14269, \#90187, …).

src/librustdoc · medium confidence · unverified

Abort messages are now forwarded on Android and zkVM targets

When a panic occurs on Android or RISC Zero zkVM targets, the panic\_abort runtime now extracts the panic payload (string or static str) and forwards it to the platform-specific abort mechanism. On Android, this uses \android\_set\_abort\_message\ to attach the message to the abort, and on zkVM, it calls \sys\_panic\ to include the message in the system panic. This improves debugging visibility by ensuring panic messages are captured in crash logs and system traces on these platforms.

_library/panic\abort · high confidence

Async closures now support FnOnce via by-move coroutine bodies and async drop support

The compiler now correctly implements \AsyncFnOnce\ for async closures by generating a second 'by-move' coroutine body that captures parent upvars by value instead of by reference, allowing the closure to be consumed. This change also introduces async drop support for coroutines, ensuring that drops are correctly elaborated and that the coroutine state machine handles async drop sequences properly.

_compiler/rustc\_mir\transform/src/coroutine · high confidence

Baked ICU list formatting data embedded in compiler

The \rustc\_baked\_icu\_data\ crate now includes generated source files that embed ICU list formatting patterns (such as separators for English, Chinese, and Russian) directly into the compiler binary. This change allows the compiler to format lists in diagnostic messages using baked-in locale data and fallback logic, removing the need to load these resources at runtime.

_compiler/rustc\_baked\_icu\data/src/data · high confidence

Compiler builtins updated with new implementations and ABI changes

The compiler-builtins library has been updated to Rust edition 2024 and now includes new implementations for AArch64 outline atomics (dispatching between LL/SC and LSE based on runtime CPU support), half-precision float operations (add, sub, mul, comparisons), and complex number multiplication and division for f32, f64, and f128. It also adds an abort implementation for AVR targets, exports inverse hyperbolic trigonometric functions, and updates the CmpResult type to be pointer-sized on most architectures while remaining i32 on AArch64 and AVR. Additionally, the library replaces the \no-asm\ feature with an \arch\ feature, stabilizes \extern "custom"\ and \asm\_cfg\, and migrates to using \libm\ traits for float and integer support.

library/compiler-builtins/compiler-builtins · high confidence

Consolidation of error code definitions into a single macro

The \rustc\_error\_codes\ crate now centralizes all active error codes within a single \error\_codes!\ macro. This change simplifies the maintenance of error codes by gathering them in one place, ensuring that the list of codes reflects the current state of the compiler and facilitating easier updates and documentation alignment.

_compiler/rustc\_error\codes/src · high confidence

Const-checking logic is refactored into a new modular \`check\_consts\` crate

The compiler's const-evaluation validation logic has been reorganized from the previous \qualify\_consts\ module into a new, structured \check\_consts\ crate. This change introduces a dedicated \Checker\ visitor in \check.rs\ to validate MIR bodies, a \FlowSensitiveAnalysis\ resolver in \resolver.rs\ to track local variable qualifications (such as interior mutability or drop requirements) across control flow, and specific modules for handling operations (\ops.rs\) and post-drop-elaboration checks (\post\_drop\_elaboration.rs\). For users, this represents a significant internal restructuring of how const-correctness is enforced, aiming to improve precision and maintainability of error reporting for const contexts without altering the fundamental rules of what is allowed.

_compiler/rustc\_const\_eval/src/check\consts · medium confidence

Cranelift backend patches disable unsupported features and slow tests

The Cranelift codegen backend applies several patches to the standard library and its test suite to accommodate current limitations. SVE/SVE2 SIMD support on aarch64 is disabled in core\_arch, and 128-bit atomic operations (AtomicI128/AtomicU128) are disabled in core::sync::atomic and related unwind-safe implementations. Additionally, several long-running or Miri-slow tests in coretests and alloctests are unconditionally ignored, and complex number multiplication and division tests on Windows are ignored to avoid Cranelift ABI issues.

_compiler/rustc\_codegen\cranelift/patches · high confidence

Custom MIR parser now supports arbitrary casts and refined statement/terminator parsing

The custom MIR parser in \rustc\_mir\_build\ has been updated to handle arbitrary type casts via \mir\_cast\_kind\ and to more precisely parse statements and terminators. This includes explicit handling for storage live/dead, assume, discriminant setting, and detailed parsing of calls (including tail calls), returns, drops, and matches with constant patterns. The parser now correctly maps THIR expressions to MIR \StatementKind\ and \TerminatorKind\ variants, ensuring that custom MIR generation aligns with the current compiler internals.

_compiler/rustc\_mir\build/src/builder/custom/parse · high confidence

Enforce soundness rules for minimal specialization

The compiler now validates that specialized implementations are always applicable, preventing unsound overlaps. This check ensures that a specialized impl does not introduce duplicate generic parameters in unconstrained base arguments, requires that all predicates in the specialized impl are satisfied by the base impl or are well-formed, and disallows specializing on empty impls (impls with no items). Additionally, it restricts specialization on const impls to prevent mixing const and non-const implementations.

_compiler/rustc\_hir\_analysis/src/impl\_wf\check · high confidence

Enforce well-formedness for Drop and negative auto trait impls

The compiler now strictly checks that \Drop\ implementations and negative auto trait impls are not specialized beyond their type definition. For \Drop\, the implementation must use the same generic parameters as the struct/enum and cannot add extra bounds; similarly, negative auto trait impls must match the ADT's generic parameters exactly. This prevents well-formedness violations where a \Drop\ or negative impl might apply to a subset of the type's valid instantiations, ensuring these impls are always applicable.

_compiler/rustc\_hir\analysis/src/check · high confidence

Fingerprint combination is now order-independent

The \Fingerprint::combine\_commutative\ method now guarantees that the resulting fingerprint is independent of the order in which inputs are combined. This ensures consistent hash values regardless of permutation, which is critical for data structures that rely on commutative combination logic.

_compiler/rustc\_data\structures/src/fingerprint · high confidence

GCC backend ported to new codegen infrastructure

The GCC codegen backend has been ported to the new \rustc\_codegen\_ssa\ infrastructure, introducing new modules for ABI handling, inline assembly, and function attributes. This change updates how the backend maps Rust types to GCC types, handles function calls and inlining, and processes inline assembly constraints, ensuring compatibility with the latest compiler internal changes.

_compiler/rustc\_codegen\gcc/src · high confidence

HIR map refactored into TyCtxt queries and new indexing structures

The legacy \Map\ type has been removed from \rustc\_middle::hir\, with its methods moved to \TyCtxt\. This change introduces new indexing structures (\ModuleItems\, \OwnerNodes\) and queries (e.g., \hir\_owner\_nodes\, \hir\_parent\_iter\) to manage HIR data, improving incremental compilation performance and simplifying the API for accessing HIR nodes and parent relationships.

_compiler/rustc\middle/src/hir · high confidence

HIR updates for lifetime syntax tracking and trait object roundtripping

The HIR module now tracks the source and syntax of lifetimes, introducing new fields and renamed variants (LifetimeKind, LifetimeSyntax) to distinguish between implicit and explicit lifetime usage. Additionally, the module includes tests verifying that trait object syntax (Dyn vs None) is correctly preserved during type conversions, ensuring robust handling of trait object representations in the High-level Intermediate Representation.

_compiler/rustc\hir/src/hir · medium confidence

Implement external crate metadata query providers

The compiler now implements the \CrateStore\ trait methods as query providers in \cstore\_impl.rs\, allowing external crate metadata to be fetched via the query system rather than direct storage access. This change introduces a \ProcessQueryValue\ helper to handle decoding and arena allocation, and uses macros to generate provider functions that decode specific metadata tables (such as \table\, \table\_defaulted\_array\, and \table\_direct\) for a given \DefId\. This enables the compiler to lazily load and cache crate metadata on demand through the standard query infrastructure.

_compiler/rustc\metadata/src/rmeta/decoder · high confidence

Improved assert! macro diagnostics with value capture

The assert! macro now captures the values of expressions involved in the assertion condition. When an assertion fails, the resulting panic message includes the original expression string along with the runtime values of the captured variables, making it easier to debug why the condition was not met.

_compiler/rustc\_builtin\macros/src/assert · high confidence

Improved compiler error messages for missing RefDecodable implementations

The \RefDecodable\ trait in the type codec module now includes a \\#\[diagnostic::on\_unimplemented\]\ attribute. When the compiler encounters a type that cannot be decoded because it lacks a \RefDecodable\ implementation, users will now see a specific note suggesting they add the type to the \impl\_ref\_decodable\_into\_arena!\ macro invocation. This change aids developers in resolving internal compiler errors related to type decoding by providing actionable guidance directly in the diagnostic output.

_compiler/rustc\middle/src/ty/codec · high confidence

Improved coverage mapping for unused functions and robust span handling

The coverage mapping generation now explicitly handles unused functions by scanning for instrumented but ungenerated code and embedding their metadata into the coverage report, ensuring they appear in reports rather than disappearing. Additionally, the system now validates source span coordinates before emitting them, discarding any regions that are improperly ordered or would cause \llvm-cov\ to fail, and gracefully handles cases where all spans in a function are discarded to prevent internal compiler errors.

_compiler/rustc\_codegen\llvm/src/coverageinfo/mapgen · high confidence

Improved debug symbol names for better MSVC debugger compatibility

The debuginfo module now generates more precise and unambiguous type names, specifically optimizing for MSVC's debugger (NatVis). This includes switching to C++-like naming conventions (e.g., \enum$\<...\>\, \ptr\_const$\<...\>\) to avoid parsing issues with special characters, ensuring unique names for closure and generator environments, and correctly handling niche-layout enums and dynamic types. These changes reduce ambiguity in variable inspection and improve the overall debugging experience on Windows.

_compiler/rustc\_codegen\ssa/src/debuginfo · high confidence

Improved diagnostics for Shared trait implementations

The compiler now provides more precise error messages when implementing the \Shared\ trait. A new \coerce\_shared.rs\ module handles the coherence checks for \Shared\, specifically resolving region obligations and extracting accurate span information for source and target types. This results in better diagnostic context, helping users identify exactly which lifetimes or types are causing conflicts in their \Shared\ implementations.

_compiler/rustc\_hir\analysis/src/coherence/builtin · high confidence

Improved disassembly parsing and stricter instruction verification in stdarch tests

The stdarch-test crate now uses a more robust disassembly parser that handles platform-specific output formats (such as Windows dumpbin and macOS objdump) and normalizes instruction representations (e.g., mapping \\[us\]shll\ to \\[us\]xtl\ on AArch64). The \assert\_instr\ macro has been tightened to require that the expected instruction appears as a distinct prefix of the actual instruction, preventing false positives from partial matches. Additionally, the test harness now detects inlining failures by checking for subroutine call instructions (e.g., \call\, \bl\) and ignores specific filler instructions like \nop\ and \int3\ when counting instruction limits, ensuring that intrinsic tests accurately reflect the generated code without being misled by compiler artifacts.

library/stdarch/crates/stdarch-test · high confidence

Improved error messages for printf-style format strings

The compiler now provides clearer, specific error messages when a printf-style format string contains unsupported flags or conversion specifiers, rather than failing silently or with generic errors. This change is implemented in the \format\_foreign/printf\ module, which parses and translates printf directives into Rust formatting syntax, and includes comprehensive tests to verify the new error reporting behavior.

_compiler/rustc\_builtin\_macros/src/format\foreign/printf · high confidence

Improved overflow detection and suggestions for integer literals

The compiler now detects integer literal overflows for negative values and values exceeding i128::MAX, and provides more accurate type suggestions (such as suggesting \cast\_signed\) when literals overflow. It also handles binary and hexadecimal literal overflows with specific diagnostics for sign issues and offers suggestions to use smaller fitting types or inclusive ranges where appropriate.

_compiler/rustc\lint/src/types · high confidence

Improved region inference for opaque types via member constraints

The borrow checker now applies member constraints during opaque type region inference, allowing it to more accurately determine the lifetimes of hidden types by analyzing how regions are used within opaque type definitions. This change refactors the opaque type handling logic into a dedicated \RegionCtxt\ and introduces a new \member\_constraints\ module that collects and applies constraints from defining uses, ensuring that member regions are lifted to appropriate static or universal regions when necessary. Users benefit from more precise lifetime checking and potentially fewer false-positive lifetime errors in complex generic code involving opaque types.

_compiler/rustc\_borrowck/src/region\_infer/opaque\types · high confidence

Incremental compilation dependency graph system overhaul

The dependency graph implementation in \rustc\_middle\ has been significantly restructured to improve incremental compilation performance and reliability. Key changes include replacing the previous \DepKind\ enum with a \u16\-based representation and a manual jump table (\DepKindVTable\) to reduce overhead, introducing a pooled \ReadsRecorder\ with epoch-filtered deduplication to minimize memory allocations during task execution, and implementing a specialized varint and bitpacking scheme for serializing the dependency graph to disk. The system now distinguishes between key and value fingerprints, allowing for more precise cache validation, and introduces \QuerySideEffect\ nodes to track diagnostic and feature usage as first-class dependencies. Additionally, the on-disk cache has been decoupled from the query engine, and the retained in-memory graph (used for debugging with \-Zquery-dep-graph\) has been renamed to \RetainedDepGraph\ and optimized for deterministic output under parallel execution.

_compiler/rustc\_middle/src/dep\graph · high confidence

Introduce new internal AST attribute data structures and versioning support

The compiler now includes new internal modules for handling attribute data structures (\data\_structures.rs\) and Rustc versioning (\version.rs\). This introduces a \CfgEntry\ enum to represent configuration predicates (including boolean literals and version checks) and a \RustcVersion\ struct to parse and manage compiler version strings, supporting features like \check-cfg\ with boolean literals. These changes form part of the ongoing refactoring of the \rustc\_ast\ attribute parsing infrastructure.

_compiler/rustc\ast/src/attr · medium confidence

Introduce new pretty-printing engine in rustc\_ast\_pretty

The \rustc\_ast\_pretty\ crate now includes a new pretty-printing implementation (\pp.rs\) based on Philip Karlton's Mesa algorithm, replacing the previous logic. This change introduces a ring-buffer-based token stream processing system (\pp/ring.rs\) to handle line breaking and indentation more efficiently, supporting both consistent and inconsistent breaking styles as well as visual alignment modes for block comments. The module also enables the \deref\_patterns\ and \negative\_impls\ compiler features to support the new implementation.

_compiler/rustc\_ast\pretty/src · high confidence

Introduce new type printing infrastructure in rustc\_middle

The compiler now uses a new module structure for type printing, with \mod.rs\ defining the core \Printer\ trait and \pretty.rs\ implementing the detailed pretty-printing logic. This change introduces new helper macros and thread-local state for controlling printing behavior, such as path trimming, visible path selection, and query reduction during printing. The new system provides more granular control over how types, paths, and other type system entities are rendered in diagnostics and error messages.

_compiler/rustc\middle/src/ty/print · high confidence

Introduces bidirectional postcard protocol for proc-macro expansion

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 adds a \bidirectional\_protocol\ module with message types for sub-requests (such as file paths, source text, and span details) and responses, allowing the client to request additional context from the server during macro expansion. The \ProcMacroServerProcess\ can now negotiate between \BidirectionalPostcardPrototype\ and \JsonLegacy\ formats, enabling more efficient and flexible data exchange for proc-macro operations.

src/tools/rust-analyzer/crates/proc-macro-api · high confidence

Introduces strict UTF-8 absolute path types for Rust Analyzer

The \paths\ crate now provides \AbsPathBuf\ and \AbsPath\ wrappers around \camino::Utf8PathBuf\ and \Utf8Path\. These types enforce that paths are both absolute and valid UTF-8 at the type level, preventing runtime errors from non-UTF-8 or relative paths in internal operations. This change improves reliability for users on Windows and other platforms where path encoding or relative path handling might previously have caused panics or unexpected behavior.

src/tools/rust-analyzer/crates/paths · high confidence

MIR inliner cycle detection becomes fallible with reduced recursion limits

The MIR inliner's cycle detection logic has been refactored to handle potential failures gracefully rather than causing internal compiler errors (ICEs). The new implementation uses a reduced recursion limit (one-eighth of the standard limit) to prevent the type solver from exhausting its budget before the inliner can detect cycles. Additionally, the process now returns \Option\<bool\>\ to signal when recursion limits are hit or normalization fails, allowing the compiler to skip inlining for complex cases instead of crashing.

_compiler/rustc\_mir\transform/src/inline · high confidence

MIR interpreter core engine refactored with provenance tracking and valtrees

The MIR interpreter in \rustc\_middle\ has been restructured to support stricter memory safety checks and more efficient constant representation. The \Allocation\ type now includes a \ProvenanceMap\ to track pointer origins (provenance) and an \InitMask\ to explicitly track initialized bytes, replacing previous implicit tracking. Error handling has been consolidated into \InterpErrorKind\ and \InterpErrorInfo\, providing better diagnostics for undefined behavior and resource exhaustion. Additionally, the system now supports \ValTree\ representations for constants, allowing constants to be evaluated and stored as tree structures rather than just memory allocations, which improves performance and enables new validation checks for const-evaluated values.

_compiler/rustc\middle/src/mir/interpret · high confidence

Major compiler refactoring in rustc\_ty\_utils

The \rustc\_ty\_utils\ crate has undergone a significant structural overhaul, introducing new modules for associated items (\assoc.rs\), common trait checks (\common\_traits.rs\), constants (\consts.rs\), diagnostics (\diagnostics.rs\), implied bounds (\implied\_bounds.rs\), and instance resolution (\instance.rs\). This change implements a new strategy for lowering 'impl trait in trait' (RPITIT) items as generic associated types (GATs), updates the layout calculation logic to use \rustc\_abi\ directly, and adds support for new language features such as \AsyncDrop\, \UnsafeUnpin\, and generic constant expressions. The refactoring also migrates query providers and diagnostic handling to the new \SessionDiagnostic\ system.

_compiler/rustc\_ty\utils · high confidence

Major overhaul of internal data structures and synchronization primitives

The \rustc\_data\_structures\ crate has been significantly refactored to improve performance, memory usage, and safety. Key changes include replacing the \Lrc\ type with \Arc\ and \once\_cell\/\lazy\_static\ with standard library equivalents like \LazyLock\ and \OnceLock\. New types such as \OwnedSlice\ (replacing \owning\_ref\), \Interned\ (renamed from \PtrKey\), and \Frozen\ have been added to manage memory and immutability more effectively. The synchronization module now introduces \DynSend\ and \DynSync\ auto-traits to better control thread-safety for dynamic types, and the jobserver implementation has been hardened with a proxy to prevent token starvation. Additionally, the stable hashing system has been overhauled with new traits and types like \Fingerprint\ and \PackedFingerprint\ to reduce memory consumption in the query dependency graph.

_compiler/rustc\_data\structures/src · high confidence

Major overhaul of the const-eval interpreter and memory model

The \rustc\_const\_eval\ interpreter has been significantly refactored to improve correctness, performance, and maintainability. Key changes include a rewrite of the constant interning logic to use mutability information from provenance rather than types, ensuring that nested statics are properly handled and deduplicated. The memory model now supports per-byte provenance and stricter aliasing checks, with new hooks for machines to manage memory lifecycle. Function call handling has been unified and abstracted, introducing \FnArg\ types for copy and in-place arguments, and improving ABI compatibility checks. Additionally, the interpreter now supports more complex types like unions with scalar layouts, c-variadic functions, and better error reporting for invalid pointer arithmetic and type validity checks.

_compiler/rustc\_const\eval/src/interpret · high confidence

Major overhaul of the linting infrastructure and built-in lints

The compiler's linting system has been significantly restructured, introducing a new \Level\ enum that adds an \Expect\ level (RFC 2383) for tracking suppressed diagnostics and a \ForceWarn\ level that cannot be overridden by user attributes. The internal representation of lint expectations has been stabilized using \HirId\ to ensure consistency across compilation sessions and caching. Additionally, the list of built-in lints in \rustc\_lint\_defs\ has been expanded and refined, including the addition of new lints such as \unused\_macro\_rules\, \dead\_code\_pub\_in\_binary\, and \unfulfilled\_lint\_expectations\, while many legacy diagnostic variants and attribute kinds have been removed to simplify the codebase.

_compiler/rustc\_lint\defs · high confidence

Major overhaul of the linting infrastructure and diagnostics

The \rustc\_lint\ crate has been significantly refactored to modernize the compiler's linting system. This change introduces a new \Diagnostic\ type to replace the legacy \LintDiagnostic\ and \LintDiagnosticBuilder\, streamlining how lint messages and suggestions are constructed and emitted. The internal lint API has been updated to use \TyCtxt\ directly, and lint passes are now bound by \TyCtxt\ for better integration with the type system. Additionally, the crate has been migrated to use the new attribute parsing infrastructure for standard lint attributes (like \\#\[allow\]\, \\#\[warn\]\, \\#\[deny\]\, and \\#\[forbid\]\), and many existing lints have been ported to use the new diagnostic system for improved consistency and clarity in error messages.

_compiler/rustc\lint/src · high confidence · unverified

Major restructuring of AST-to-HIR lowering and diagnostics

The AST lowering subsystem has been significantly refactored to improve modularity, performance, and diagnostic quality. The \LoweringContext\ has been split into per-owner contexts to reduce global state, and the lowering process is now incremental and query-based. A new \SessionDiagnostic\ infrastructure replaces the old error handling, providing more robust and translatable error messages. Key behavioral changes include the introduction of \move(expr)\ syntax for closures and coroutines, support for precise capturing in traits, and the stabilization of several features like \let\_chains\ and \destructuring\_assignment\. The HIR representation has been updated to better track source spans, lifetime captures, and coroutine kinds, while dead code and legacy constructs (like \NodeId\-based maps) have been removed.

_compiler/rustc\_ast\lowering/src · high confidence

Migrate assists to SyntaxEditor and SyntaxFactory

The \ide-assists\ crate has been refactored to use the new \SyntaxEditor\ and \SyntaxFactory\ APIs for generating code changes. This migration replaces the previous \make::\ and \ted\-based approaches, resulting in more robust and consistent code generation across assists like \add\_braces\, \add\_label\_to\_loop\, and \add\_missing\_match\_arms\. The change also introduces a new \AssistConfig\ structure to centralize assist settings and improves the \AssistContext\ to better handle selection ranges and edition-aware file IDs.

src/tools/rust-analyzer/crates/ide-assists · high confidence

Migrate parser diagnostics to derive-based diagnostic structs

The \rustc\_parse\ crate has been refactored to replace the legacy \struct\_span\_err!\ and \DiagnosticBuilder\ APIs with a new derive-based diagnostic system. This change introduces dedicated structs (e.g., \AmbiguousPlus\, \IncorrectSemicolon\, \MismatchedClosingDelimiter\) in \src/diagnostics.rs\ and \src/lexer/diagnostics.rs\ that use the \\#\[derive(Diagnostic)\]\ and \\#\[derive(Subdiagnostic)\]\ macros. For users, this results in more consistent, structured error messages with better span accuracy and improved suggestions, while also enabling future enhancements like translation and better IDE integration.

_compiler/rustc\parse · high confidence

Migrate type inference and const evaluation to the new trait solver

The type inference engine and constant evaluation logic in \hir-ty\ have been rewritten to use the new trait solver. This migration includes porting autoderef, pattern inference, closure capture computation, and MIR lowering to the new solver's types, ensuring that type checking, trait resolution, and const evaluation behave consistently with the updated solver. Users will see more accurate diagnostics and fewer panics in complex type scenarios, particularly involving trait bounds, associated types, and const generics. Also in this area: Prevent infinite recursion in struct layout calculation; Fix enum niche decoding to match rustc behavior.

src/tools/rust-analyzer/crates/hir-ty · high confidence

Migration of attribute parsing to a new infrastructure

The compiler's attribute parsing logic has been moved into the \rustc\_attr\_parsing\ crate, introducing a new parsing infrastructure for built-in attributes. This change ports numerous attributes—including \\#\[cfg\]\, \\#\[deprecated\]\, \\#\[doc\]\, \\#\[allow\]\, \\#\[must\_use\]\, \\#\[export\_name\]\, and \\#\[optimize\]\—to the new system, which centralizes validation, target checking, and error reporting. Users will see more consistent error messages and suggestions for malformed attributes, as well as improved handling of duplicate and unstable attributes.

_compiler/rustc\_attr\parsing/src/attributes · high confidence

New AST utility modules for classification, parsing, and literals

The \compiler/rustc\_ast/src/util\ directory now contains dedicated modules for AST utilities: \classify.rs\ provides functions to determine if an expression is complete or requires a semicolon, and to detect leading labels in break values; \parser.rs\ defines operator precedence levels (\ExprPrecedence\), associativity (\Fixity\), and helper functions for parsing context; \literal.rs\ handles literal token conversion and escaping using the \rustc\_literal\_escaper\ crate; \comments.rs\ manages doc comment beautification and detection of documentation links; \case.rs\ introduces a \Case\ enum for case-sensitivity handling; and \unicode.rs\ adds support for detecting Unicode text flow control characters. These changes reorganize and expand the internal AST utility infrastructure to support new language features and improve parsing accuracy.

_compiler/rustc\ast/src/util · high confidence

New centralized attribute parsing infrastructure

The compiler now uses a new, centralized attribute parsing system in \rustc\_attr\_parsing\. This change introduces a modular architecture where attribute definitions, parsing logic, and diagnostics are handled by dedicated modules (\context\, \parser\, \diagnostics\, \safety\, \stability\, \target\_checking\) rather than being scattered across the AST lowering and validation phases. For users, this results in more consistent error messages, better suggestions for malformed attributes, and improved handling of attribute safety and stability checks during compilation.

_compiler/rustc\_attr\parsing/src · high confidence

New const-eval utility modules for alignment, validity, and type printing

The \compiler/rustc\_const\_eval/src/util\ directory now contains several new modules that provide core utilities for constant evaluation. \alignment.rs\ adds helpers to detect and report unaligned memory accesses within packed structs. \check\_validity\_requirement.rs\ implements logic to validate whether types can be safely initialized (zeroed or unmitigated) by checking layout and field constraints. \caller\_location.rs\ provides the implementation for allocating and formatting \core::panic::Location\ values during const evaluation. \compare\_types.rs\ exposes type-relation routines (\sub\_types\, \relate\_types\) for use by the interpreter. \type\_name.rs\ re-implements the \type\_name\ intrinsic using a new \TypeNamePrinter\ that correctly handles modern type kinds like coroutines and opaque types. \mod.rs\ wires these together and adds helper functions for classifying MIR operators and gathering context spans for diagnostics.

_compiler/rustc\_const\eval/src/util · high confidence

New diagnostics and const-evaluation infrastructure in rustc\_const\_eval

The \rustc\_const\_eval\ crate now includes a dedicated \diagnostics\ module defining structured error types for constant evaluation failures, such as dangling or mutable pointers in final values, thread-local access errors, and restrictions on exposing unstable features in stable const contexts. The crate's entry point (\lib.rs\) registers new compiler queries and hooks to support these checks, including \eval\_to\_valtree\, \valtree\_to\_const\_val\, and \check\_validity\_requirement\, enabling more precise validation and reporting during compile-time evaluation.

_compiler/rustc\_const\eval/src · high confidence

New rustc\_structures crate for shared compiler types

A new \rustc\_structures\ crate has been introduced to centralize basic structs used across the compiler, such as \CrateType\, \Limit\, \NativeLibKind\, \CollapseMacroDebuginfo\, and \SanitizerSet\. This refactoring moves these types out of their previous locations to reduce coupling and improve modularity. Notably, the \SanitizerSet\ implementation now includes logic to implicitly disable mutually exclusive sanitizers (e.g., Address and Memory) when combining default and explicit sanitizer flags, aligning with Clang's driver behavior to prevent invalid sanitizer configurations.

_compiler/rustc\structures · high confidence

New toolchain discovery and command execution logic

The toolchain crate now introduces a new mechanism for locating and executing Rust toolchain binaries (cargo, rustc, rustup, rustfmt). It implements a prioritized search strategy that checks environment variables, the PATH, and the CARGO\_HOME/bin directory to find executables. Additionally, it enforces a current working directory for spawned commands and prevents rustup from automatically installing toolchains by setting the RUSTUP\_AUTO\_INSTALL=0 environment variable. The code also adds logic to conditionally pass the -Zjson-target-spec flag to Cargo for toolchains version 1.95.0 and newer when using JSON target specifications.

src/tools/rust-analyzer/crates/toolchain · high confidence

New type-privacy lints replace private-in-public errors

The compiler now introduces \private\_interfaces\ and \private\_bounds\ lints to replace the existing private-in-public errors and compatibility lints. These lints warn when a type or generic bound used in an item's public interface is more private than the item itself, providing clearer diagnostics that explain the visibility mismatch between the item and its underlying types. This change is part of the ongoing type-privacy RFC implementation, aiming to improve the accuracy and clarity of privacy-related warnings for users.

_compiler/rustc\privacy · high confidence

Opaque type inference now supports duplicate hidden types and rollback

The opaque type inference engine in \rustc\_infer\ has been refactored to support multiple hidden types for the same opaque type key via a new \duplicate\_entries\ list in \OpaqueTypeStorage\, and to allow rolling back changes to opaque type caches using undo logs. This enables the compiler to correctly handle scenarios where an opaque type is inferred multiple times within the same scope (such as with Type Alias Impl Trait) and ensures that speculative inference steps can be safely reverted without corrupting the type context.

_compiler/rustc\_infer/src/infer/opaque\types · high confidence

Optimize BTreeMap merge and append with bulk allocation

The BTreeMap append and merge operations now use a new \bulk\_push\ helper that allocates nodes in bulk and pushes key-value pairs directly into the tree structure. This reduces the number of individual allocations and node splits during bulk insertions, improving performance for operations that add many elements at once.

library/alloc · high confidence

Optimized allocation tracking with lazy InitMask and per-byte provenance support

The compiler's memory interpretation engine now uses a lazy \InitMask\ structure that avoids materializing full initialization bitmasks for allocations that are entirely initialized or uninitialized, improving performance and reducing memory usage. Additionally, the \ProvenanceMap\ has been extended to support per-byte provenance tracking via \PointerFrag\, allowing the interpreter to correctly handle pointer fragments and mutable pointer passing through FFI, while maintaining efficient serialization by bypassing varint encoding for large bitmasks.

_compiler/rustc\middle/src/mir/interpret/allocation · high confidence

Overhaul coverage instrumentation with HIR-aware span extraction and node-flow counter assignment

The coverage instrumentation pass in \rustc\_mir\_transform\ has been completely rewritten to improve accuracy and simplify the internal logic. Span extraction now leverages HIR information to correctly identify 'hole spans' (such as closures and nested items) that should be excluded from coverage, and builds an expansion tree based on \SyntaxContext\ to properly handle macro expansions. The control-flow graph is simplified into Basic Coverage Blocks (BCBs), and counter assignment uses a new node-flow graph algorithm to determine which blocks receive physical counters versus counter expressions, prioritizing reloop nodes for expressions to optimize binary size. Additionally, branch mappings for MC/DC are now extracted separately, and the system correctly handles async functions by ignoring their desugared body spans.

_compiler/rustc\_mir\transform/src/coverage · high confidence

Overhaul of coverage counter assignment using balanced flow graphs

The coverage counter assignment logic has been completely reworked to use a node-flow graph approach based on balanced control-flow graphs. This change introduces a new \BalancedFlowGraph\ wrapper that augments the underlying graph with synthetic nodes and edges to ensure flow balance, and a new \node\_flow\ module that applies the Knuth & Stevenson algorithm to determine optimal measurement points. Users will see changes in how coverage counters are generated and assigned to MIR nodes, potentially affecting the precision or structure of coverage data, as the system now treats the merged node flow graph as a plain data structure and defers part of counter creation until codegen.

_compiler/rustc\_mir\transform/src/coverage/counters · high confidence

Polonius MIR dump now renders as an interactive HTML report

The Polonius MIR dump output has been refactored from a raw text format into a structured HTML page. This new view presents the MIR, Polonius constraint graph, Control-flow graph, and NLL region/SCC graphs using Mermaid.js visualizations. It also includes a dedicated Loan Traces section where traces are hidden by default and can be expanded via clickable buttons, along with quick links to navigate between the different diagnostic sections.

_compiler/rustc\borrowck/src/polonius/dump · high confidence

Polonius borrow-checker uses a localized constraint graph for flow-sensitive loan propagation

The Polonius borrow-checking implementation has been restructured to model loan propagation as a reachability problem on a new localized constraint graph. This graph combines region outlives constraints with control-flow graph (CFG) liveness, allowing loans to flow between regions at specific program points and along live paths in the CFG. The change introduces lazy traversal of this graph to compute loan liveness, deferring liveness computations until needed to improve performance. Additionally, a new HTML-based MIR dump format has been added to visualize the Polonius constraint graph, loan reachability, and CFG structure for debugging purposes.

_compiler/rustc\borrowck/src/polonius · high confidence

Port \#\[custom\_mir\] to the new attribute system

The implementation of the \\#\[custom\_mir\]\ attribute in \compiler/rustc\_mir\_build/src/builder/custom\ has been updated to use the new \rustc\_attr\_ir\ attribute representation. This change modifies how the compiler detects and processes the attribute during MIR building, specifically updating the parsing logic for dialect and phase arguments (e.g., \Built\, \Analysis\, \Runtime\) to align with the new attribute infrastructure, while maintaining the existing functionality of lowering custom MIR from THIR.

_compiler/rustc\_mir\build/src/builder/custom · high confidence

Prevents direct \`cargo build\` of the compiler

The \rustc\_macros\ crate now includes a build script that blocks attempts to build the compiler using \cargo build\ directly. If the \RUSTC\_BOOTSTRAP\ environment variable is not set, the build process will fail with an error message directing users to use the proper bootstrap procedure, ensuring the compiler is built in the correct environment.

_compiler/rustc\macros · high confidence

Proc-macro bridge rewritten for cross-thread execution and improved performance

The internal communication bridge between proc-macro crates and the compiler has been completely rewritten. It now supports cross-thread execution for nested proc-macros, preventing thread-local state invalidation issues. The new implementation uses a custom arena allocator and a fast, non-cryptographic hash algorithm (fxhash) to reduce message overhead and improve performance. Serialization is handled via a new RPC layer with C ABI buffers, allowing safe interaction between different compiler stages. Additionally, panic messages are now properly captured and transmitted across the bridge, improving error reporting for proc-macros.

_library/proc\macro · high confidence

Proc-macro server reimplementation using rustc's internal bridge

The proc-macro-srv component has been restructured to use rustc's internal proc-macro bridge (rustc\_proc\_macro) instead of the previous implementation. This introduces a new server architecture with two span backends: a Rust Analyzer-specific backend (RaSpanServer) that integrates with RA's internal span representation, and a legacy SpanId backend for compatibility. The change includes new build scripts to detect the rustc version for ABI selection, a test harness (proc-macro-test) for validating proc-macro expansion, and updated dynamic library loading logic that handles Windows DLL locking via temporary file copies. Users benefit from improved proc-macro expansion accuracy and better integration with rust-analyzer's internal data structures.

src/tools/rust-analyzer/crates/proc-macro-srv · high confidence

Profiler builtins library stabilized with no\_core and internal features

The profiler\_builtins library has been introduced as a new file in the library directory, marking a shift from previous implementations by adopting the \\#!\[no\_core\]\ attribute instead of just \\#!\[no\_std\]\. This change indicates that the library is now built on a minimal core without standard library dependencies, which is a significant architectural shift for internal profiling tools. The code also enables specific internal features like \no\_core\, \profiler\_runtime\, and \staged\_api\, and includes an \allow(internal\_features)\ lint to suppress warnings about using unstable internal capabilities. The library is marked as unstable with the feature \profiler\_runtime\_lib\, noting it as an internal implementation detail of rustc.

_library/profiler\builtins · medium confidence

Redesigned macro-by-example engine with NFA-based matching and per-token edition support

The \mbe\ crate has been refactored to use a new NFA-based matcher and a dedicated transcriber, replacing the previous expansion logic. This change introduces support for declarative attribute and derive macros, allows lifetime repeats (e.g., \$( $x )'a\*\), and implements the \${concat(...)}\ metavariable expression. It also adds edition-aware parsing via per-token edition tracking (including \expr\_2021\ support) and fixes several expansion bugs, such as panics on lone quotes and stack overflows at expansion limits. A new benchmark module has been added to track macro parsing and expansion performance.

src/tools/rust-analyzer/crates/mbe · high confidence

Refactor Apple SDK detection and introduce new Apple platform targets

The compiler now uses a dedicated \apple.rs\ module to handle Apple-specific linking details, including robust SDK root detection via \xcrun\ and correct Mach-O platform versioning for macOS, iOS, tvOS, watchOS, and visionOS. This change also adds support for new Apple platform targets (visionOS, Mac Catalyst, and iOS simulator environments) and ensures the linker receives the correct SDKROOT environment variable. Additionally, the linker infrastructure has been refactored to support new linker flavors (such as L4Bender and BPF), improve argument handling for cross-compilation, and stabilize the \link-self-contained\ option for creating self-contained binaries.

_compiler/rustc\_codegen\ssa/src/back · high confidence

Refactor LLVM codegen backend to use generic builder and new allocator shim

The LLVM codegen backend has been refactored to use a generic \GenericBuilder\ type, replacing the previous builder implementation to improve type safety and reduce code duplication. Additionally, a new \allocator.rs\ module has been introduced to handle the code generation of the allocator shim, centralizing the logic for creating wrapper functions for allocation, deallocation, and reallocation. These changes improve the maintainability and correctness of the code generation process.

_compiler/rustc\_codegen\llvm/src · high confidence

Refactor LLVM coverage codegen into a dedicated module with safe FFI wrappers

The LLVM backend's source-based code coverage implementation has been reorganized into a new \coverageinfo\ module, separating FFI bindings (\ffi.rs\), safe wrapper functions (\llvm\_cov.rs\), and map generation logic (\mapgen.rs\). This change introduces safe Rust wrappers for LLVM coverage intrinsics, replacing previous unsafe direct calls, and restructures how coverage data (such as counter expressions, source spans, and branch regions) is passed to LLVM. The refactoring also enforces stricter type safety for file IDs and ensures the coverage map version is correctly validated against the LLVM toolchain, improving reliability and maintainability of the coverage instrumentation pipeline.

_compiler/rustc\_codegen\llvm/src/coverageinfo · high confidence

Refactor MIR codegen to use SSA-based locals and new ABI representations

The MIR codegen backend has been refactored to determine which locals require stack allocation (allocas) versus those that can be kept in SSA registers, significantly reducing unnecessary memory operations. This change introduces a new \LocalAnalyzer\ to classify locals as ZST, Memory, or SSA, and updates the \FunctionCx\ and \LocalRef\ structures to handle these states. Additionally, the codegen now uses the new \rustc\_abi::BackendRepr\ and \PassMode\ abstractions, replacing older LLVM-specific concepts like \FnAbi\ usage in codegen and \ByVal\ attributes with \on\_stack\ fields, improving backend neutrality and correctness for indirect arguments and tail calls.

_compiler/rustc\_codegen\ssa/src/mir · high confidence

Refactor base-db to use Salsa for database inputs and edition tracking

The \base-db\ crate has been refactored to manage source code inputs (file text, source roots, and crate graphs) and edition-aware file identification through the Salsa incremental computation framework. This change introduces \FileChange\ for transactional database updates, \EditionedFileId\ for interned, edition-aware file tracking, and durability-based caching for library versus local files, providing a more robust and performant foundation for the analyzer's database state.

src/tools/rust-analyzer/crates/base-db · high confidence

Refactor codegen attribute handling to use the new parsed attribute infrastructure

The \rustc\_codegen\_ssa\ crate has been updated to process function and crate attributes using the new \rustc\_attr\_ir\ parsing infrastructure. This change replaces the previous attribute handling mechanisms with a unified system, affecting how attributes like \\#\[target\_feature\]\, \\#\[inline\]\, \\#\[used\]\, and \\#\[link\_name\]\ are parsed and applied during code generation. The refactoring ensures that attribute validation and codegen flag extraction are consistent with the rest of the compiler's new attribute parsing pipeline, improving maintainability and reducing duplication in how compiler-specific attributes are interpreted.

_compiler/rustc\_codegen\ssa/src · high confidence

Refactor compiler configuration and option parsing infrastructure

The compiler's command-line option parsing and configuration infrastructure has been significantly refactored. The \config.rs\ module has been expanded and reorganized into submodules (\cfg\, \externs\, \native\_libs\, \print\_request\, \sigpipe\) to handle specific configuration areas like \--extern\ argument parsing, native library modifiers, \--print\ request handling, and signal pipe behavior. This change introduces new structures for parsing \--extern\ arguments (supporting namespaced crates via an unstable flag) and refactors how search paths and library candidates are managed in \filesearch.rs\, including support for implicit sysroot dependencies. Additionally, the \PrintKind\ enum is now explicitly categorized (Target, Codegen, Linker, Crate) and stabilized for several values, while the \--print\ syntax is updated to support \KIND=PATH\ output redirection.

_compiler/rustc\session · high confidence

Refactor delegation AST-to-HIR lowering to resolve paths and propagate generics earlier

The delegation feature's implementation in \rustc\_ast\_lowering\ has been restructured to resolve delegation targets and generate HIR generics during the AST-to-HIR lowering phase, rather than deferring this work to later type-checking stages. This change introduces dedicated modules for handling delegation attributes (such as inheriting \\#\[must\_use\]\ and \\#\[inline\]\), managing generic parameter propagation (including \Self\ type mapping and inference), and resolving delegation paths (including heuristics for inherent impls). For users, this results in delegation errors being detected and reported earlier in the compilation process, with more accurate signature inheritance and generic handling for delegated functions.

_compiler/rustc\_ast\lowering/src/delegation · high confidence

Refactor inhabitedness checking to use InhabitedPredicate

The inhabitedness logic in \rustc\_middle\ has been refactored to use a new \InhabitedPredicate\ type, which captures whether a type is inhabited, uninhabited, or conditionally uninhabited based on module visibility and generic parameters. This change introduces specific predicates for handling private fields (\NotInModule\), opaque types (\OpaqueType\), and generic types (\GenericType\), allowing for more precise and efficient checks during pattern matching and type validation.

_compiler/rustc\middle/src/ty/inhabitedness · high confidence

Refactor must\_use lint logic and handle uninhabited types

The \must\_use\ lint logic has been refactored into a dedicated module, introducing a new \IsTyMustUse\ enum to distinguish between types that must be used, ordinary types, and trivial types. A key behavioral change is that \Result\<T, !\>\ and \ControlFlow\<!, T\>\ are now treated as equivalent to \T\ for the purpose of the lint, meaning the uninhabited error type no longer triggers a warning when ignored. The lint pass now uses \emit\_span\_diag\_lint\ for diagnostics, and the \is\_ty\_must\_use\ function has been made public and simplified to not require a span argument.

_compiler/rustc\lint/src/unused · high confidence

Refactor panic\_unwind to use cfg\_select and modernize ABI handling

The panic\_unwind library has been restructured to use the cfg\select! macro for target-specific dispatch, replacing previous conditional compilation logic. This change consolidates support for various platforms (including Windows SEH, GCC/libunwind, Miri, and dummy abort implementations) into a single, cleaner entry point. Additionally, the implementation now uses the Rust ABI for internal panic functions like \\_rust\_start\panic and \\_rust\_panic\_cleanup, and marks these symbols as safe, improving type safety and consistency across the standard library's panic handling mechanisms.

_library/panic\unwind · high confidence

Refactor trait resolution to use a new Obligation and Clause-based architecture

The trait resolution system in \rustc\_infer\ has been restructured to use a new \Obligation\ and \Clause\-based architecture. This change introduces a generic \Obligation\ struct that wraps predicates, separating the cause and environment from the predicate itself, and replaces the previous \PredicateKind\ with a unified \Clause\ type. The \TraitEngine\ trait is now generic over error types, allowing for more flexible error handling via \TraitErrors\ and \ScrubbedTraitError\. Additionally, the projection cache has been updated to use \AliasTerm\ and \ParamEnv\ in its keys, and the elaboration logic has been refactored to work with clauses directly, improving the handling of supertrait bounds and associated items.

_compiler/rustc\infer/src/traits · high confidence

Refactor type context internals and thread-local storage

The type context implementation has been reorganized to improve modularity and performance. The \Interner\ trait implementation for \TyCtxt\ is now in a dedicated \impl\_interner.rs\ file, separating the core type-interning logic from the context definition. Thread-local storage (TLS) handling has been extracted into a new \tls.rs\ module, simplifying the \with\_tlv\ mechanism and using Rayon's TLV directly. Additionally, the \ImplicitCtxt\ structure has been simplified by removing the \Clone\ derive and unused parameters, and various internal types like \UnevaluatedConst\ have been renamed to \AliasConst\ to better reflect their usage in the type system.

_compiler/rustc\middle/src/ty/context · high confidence

Refactored C++-like and native debuginfo generation for enums and coroutines

The debuginfo codegen for enums and coroutines has been restructured into separate \cpp\_like\ and \native\ modules, allowing the compiler to emit distinct DWARF representations based on the \cpp\_like\_debuginfo\ setting. For C++-like debuginfo, enums are now represented as unions with explicit tag fields and nested variant structs, supporting 128-bit discriminants by splitting them into low/high 64-bit parts and using \enum2$\ type names for debugger compatibility. Native debuginfo continues to use \DW\_TAG\_structure\_type\ with \DW\_TAG\_variant\_part\. Coroutines now share this dual-path generation logic, ensuring consistent debug experience across both encoding styles.

_compiler/rustc\_codegen\llvm/src/debuginfo/metadata/enums · high confidence

Refactored Cranelift backend ABI handling into modular components

The Cranelift codegen backend's ABI logic has been reorganized into distinct modules (comments, pass\_mode, returning) to improve maintainability and clarity. This change introduces detailed CLIF IR comments that annotate how function arguments are passed and where local variables are stored, aiding in debugging and verification. It also refactors argument passing and return value handling to align with updated \rustc\_abi\ and \rustc\_target\ types, ensuring correct code generation for various calling conventions and data layouts.

_compiler/rustc\_codegen\cranelift/src/abi · high confidence

Refactored LLVM backend into modular components with safe resource management

The LLVM codegen backend in \compiler/rustc\_codegen\_llvm/src/back\ has been restructured into distinct modules (\archive\, \llvm\_backend\, \lto\, \write\, \profiling\) to improve code organization and maintainability. A key behavioral improvement is the introduction of \OwnedTargetMachine\ and \OwnedMCSubtargetInfo\, which provide safe, RAII-managed wrappers for LLVM C++ objects, eliminating manual memory management and potential use-after-free errors. The archive handling now delegates to the \object\ crate for standard archives while using LLVM specifically for extracting symbols from bitcode and COFF bigobj files, ensuring compatibility with newer LLVM versions. Additionally, the backend now integrates a self-profiling mechanism (\LlvmSelfProfiler\) to track LLVM pass execution times, providing better visibility into optimization performance.

_compiler/rustc\_codegen\llvm/src/back · high confidence

Refactored MIR dataflow analysis framework API and internals

The \rustc\_mir\_dataflow\ framework has been restructured to simplify the analysis API and improve performance. The previous \GenKillAnalysis\ trait has been removed in favor of a unified \Analysis\ trait, which now handles both gen-kill and generic dataflow problems. The framework now distinguishes between 'early' and 'primary' effects for statements and terminators, allowing for more granular control over state updates (e.g., for two-phase borrows). \Results\ and \ResultsCursor\ have been decoupled from the \Analysis\ implementation, and \ResultsCursor\ now supports random access inspection with linear performance for forward-ordered visits. Backward dataflow analyses no longer support \SwitchInt\ edge effects, and the \Direction\ trait uses constants (\IS\_FORWARD\, \IS\_BACKWARD\) instead of methods. Additionally, \HybridBitSet\ has been replaced with \MixedBitSet\ and \ChunkedBitSet\ for better sparse representation, and Graphviz output formatting has been improved with diff support.

_compiler/rustc\_mir\dataflow/src/framework · high confidence

Refactored borrow-checker constraint graph and constraint data structures

The borrow-checker's internal constraint handling has been restructured to improve graph traversal and diagnostic accuracy. The \OutlivesConstraint\ struct now includes an explicit \Span\ field, allowing error messages to reference the precise source location where a constraint was created rather than relying on potentially less accurate span information from constraint locations. Additionally, the constraint graph implementation has been split into \Normal\ and \Reverse\ variants via a \ConstraintGraphDirection\ trait, enabling efficient iteration over both outgoing constraints (for region inference) and incoming constraints (for liveness optimization). The graph data structures have also been consolidated, merging predecessor/successor logic into unified \Successors\ and \Predecessors\ traits and simplifying internal graph management.

_compiler/rustc\borrowck/src/constraints · high confidence

Refactored canonical query system with new response handling and caching

The canonical query infrastructure in \rustc\_infer\ has been restructured to improve how query inputs and responses are processed. The new \canonicalizer.rs\ module introduces distinct modes for canonicalizing queries versus responses, ensuring that free regions are handled appropriately for each context. A new \query\_response.rs\ module centralizes the logic for creating canonicalized query results, including the extraction and encoding of region obligations and the handling of opaque types. Additionally, the \instantiate.rs\ module now provides optimized instantiation of canonical values with caching mechanisms to reduce redundant computations during type inference.

_compiler/rustc\infer/src/infer/canonical · high confidence

Refactored debuginfo type metadata generation and enum encoding

The debuginfo generation for types has been refactored to improve structure and accuracy. The system now uses a \TypeMap\ with \UniqueTypeId\ to track debug nodes, ensuring proper handling of complex types like enums and coroutines. A key behavioral change is the adoption of a C++-like encoding for enums, which creates separate debuginfo nodes for variant parts and wrapper structs, potentially altering how enum structures appear in debuggers. Additionally, the code now explicitly uses \LLVMDIBuilderCreateUnionType\ and \LLVMDIBuilderCreateStructType\ for better type fidelity, and file/line metadata is now correctly attached to enum variants and fields. Internal refactors include renaming \stable\_hasher\ to \stable\_hash\ and using \TypingEnv\ for normalization checks.

_compiler/rustc\_codegen\llvm/src/debuginfo/metadata · high confidence

Refactored diagnostic derive macros into modular components

The diagnostic derive implementation in \rustc\_macros\ has been reorganized into distinct modules (\diagnostic\, \subdiagnostic\, \message\, \error\, \utils\) to improve maintainability and separation of concerns. This change introduces a new \DiagnosticDerive\ struct for generating \into\_diag\ methods and a \SubdiagnosticDerive\ struct for \add\_to\_diag\, while extracting message parsing and validation logic into \Message\ and \error\ handling utilities. The refactoring supports more robust attribute parsing, better error reporting for invalid diagnostic attributes, and enables features like eager subdiagnostic translation and support for \Vec\ and \MultiSpan\ fields in diagnostic structs.

_compiler/rustc\macros/src/diagnostics · high confidence

Refactored file locking to use a global registry and platform-specific modules

The file locking implementation in rustc\_data\_structures has been restructured to separate platform-specific logic into dedicated modules (unix.rs, unsupported.rs) and introduce a global lock registry. This change ensures that multiple lock requests for the same path share a single underlying file descriptor, preventing premature unlocks when multiple Lock instances exist. It also adds support for GNU/Hurd by handling specific type sizes for fcntl locks and provides a fallback for unsupported platforms that returns an error.

_compiler/rustc\_data\structures/src/flock · high confidence

Refactored incremental compilation persistence into a dedicated module

The incremental compilation cache logic has been reorganized into a new \rustc\_incremental::persist\ module, consolidating file-system management, serialization, and loading into \fs.rs\, \file\_format.rs\, \data.rs\, \load.rs\, \save.rs\, and \work\_product.rs\. This change introduces a strict file format with version headers (magic bytes, format version, and compiler version) to ensure cache compatibility, and implements a rebuild-from-scratch strategy where new sessions write to isolated working directories that are only finalized and published once compilation succeeds. The refactoring also adds garbage collection for stale session directories, memory-mapped file reading for performance, and a new \\#\[rustc\_clean\]\ attribute system for testing fingerprint consistency.

_compiler/rustc\incremental/src/persist · high confidence

Refactored inference snapshot and rollback mechanics

The inference snapshot system has been restructured to improve modularity and correctness. Snapshot handling logic has been moved into a dedicated \snapshot\ module, separating concerns for undo logs, region constraints, and variable tracking. A new \fudge.rs\ module implements \fudge\_inference\_if\_ok\, which allows type-checking closures to create temporary inference variables that are safely replaced with fresh ones upon snapshot rollback, preventing dangling region variable references. The \UndoLog\ enum now explicitly tracks changes to opaque types, region constraints, and various unification tables, ensuring that rollbacks correctly reverse all side effects including solver region constraints and HIR type-checking goals.

_compiler/rustc\infer/src/infer/snapshot · high confidence

Refactored lifetime outlives environment and constraint processing

The lifetime outlives logic has been restructured to use a new \OutlivesEnvironment\ struct that explicitly collects and manages outlives relations, replacing the previous scattered tracking of region information. This change introduces dedicated modules for handling outlives obligations, verification, and type matching, providing a more centralized and maintainable approach to resolving region constraints and checking lifetime bounds during type checking.

_compiler/rustc\infer/src/infer/outlives · high confidence

Refactored liveness analysis with deferred computation for Polonius

The liveness analysis module in the borrow checker has been restructured to support deferred liveness computation for Polonius-relevant locals. A new \LocalUseMap\ component tracks definitions, uses, and drops of local variables to enable efficient, on-demand liveness checks during loan propagation, rather than computing liveness for all locals upfront. This change optimizes performance by skipping unnecessary work for locals that do not impact loan liveness, while maintaining correctness for both NLL and Polonius modes.

_compiler/rustc\_borrowck/src/type\check/liveness · high confidence

Refactored move path analysis to use a filterable builder and optimized lookup structures

The move path analysis in \rustc\_mir\_dataflow\ has been restructured to improve performance and flexibility. The \MoveDataBuilder\ now accepts a type filter, allowing the analysis to be parameterized on which types should be tracked for moves. Additionally, the \un\_derefer\ lookup logic has been merged into \MovePathLookup\ and optimized, reducing the overhead of resolving place projections during dataflow analysis.

_compiler/rustc\_mir\_dataflow/src/move\paths · high confidence

Refactored region constraint collection and leak checking logic

The region constraint system in \rustc\_infer\ has been restructured to improve clarity and performance. The \leak\_check.rs\ module now explicitly handles universe-based placeholder leak detection using a graph-based Strongly Connected Components (SCC) algorithm, ensuring soundness by restricting checks to specific snapshots. The core \mod.rs\ introduces a refined \Constraint\ enum with explicit \ConstraintKind\ variants (e.g., \VarSubVar\, \RegSubReg\) and a \Verify\ structure for post-inference checks, while \RegionConstraintStorage\ now manages unification and least/greatest upper bound caching more idiomatically. These changes streamline how the compiler tracks and validates lifetime relationships during type inference.

_compiler/rustc\_infer/src/infer/region\constraints · high confidence

Refactored register kind and alignment logic in callconv

The callconv module has been reorganized to improve internal uniformity and precision in how backend types are represented. A new \RegKind\ enum explicitly distinguishes between Integer, Float, PpcF128 (IBM extended-precision), and Vector types, allowing the compiler to preserve SIMD element type information for optimization hints. The \Reg\ struct now combines a \RegKind\ with a \Size\, and its \align\ method uses target-specific data layout rules to determine alignment for each kind, including specific handling for PowerPC's 128-bit float and Rust-style vector alignment. This change also introduces \RegKind::from\_primitive\ to map primitive types to their corresponding register kinds and removes the \HashStable\_Generic\ derive in favor of \StableHash\.

_compiler/rustc\abi/src/callconv · high confidence

Reimplemented serialization with performance-optimized LEB128 and buffered file encoding

The \rustc\_serialize\ crate has been rewritten to improve serialization performance and reduce memory overhead. It introduces a new \FileEncoder\ that uses a 64 kB fixed-size buffer for file output, avoiding the memory allocation spikes of the previous in-memory approach. The integer encoding logic now uses a specialized, overflow-check-skipping LEB128 implementation (with debug-only checks) to speed up hot paths. Additionally, the encoder/decoder traits have been made infallible, using delayed error handling internally to simplify code and improve speed, while string validation is optimized by checking for specific sentinel bytes rather than full UTF-8 validation.

_compiler/rustc\serialize · high confidence

Restoration of Lexical Region Resolution module

The \lexical\_region\_resolve\ module in \rustc\_infer\ has been restored, replacing the previous state where it was removed in favor of Non-lexical lifetimes (NLL). This change reintroduces the \LexicalResolver\ and associated constraint indexing structures (\IndexedConstraintEdges\), effectively reverting the removal of the legacy lexical region resolution logic. While NLL remains the default, this module is now present in the compiler source tree, likely to support legacy resolution paths or specific compiler modes.

_compiler/rustc\_infer/src/infer/lexical\_region\resolve · medium confidence

Restructured diagnostics and import resolution logic in the name resolver

The \rustc\_resolve\ crate has been refactored to improve the quality and maintainability of compiler diagnostics and import resolution. Error messages for name resolution issues (such as using generic parameters from outer items, or implementing methods/types not present in a trait) are now defined using structured diagnostic types, providing more precise spans and helpful suggestions. Additionally, the import resolution logic has been reorganized, with significant changes to how imports are tracked and how visibility is handled, which may affect the accuracy of warnings for unused or ambiguous imports.

_compiler/rustc\resolve · medium confidence

Restructured libunwind with unified types and cfg\_select-based linkage

The library/unwind crate has been reorganized to improve maintainability and target coverage. A new types module centralizes shared definitions like \_Unwind\_Exception and unwinder\_private\_data\_size, ensuring consistency across libunwind and the unwinding crate. Linkage logic now uses cfg\select! for cleaner conditional compilation, and the wasm module explicitly handles the \\_cpp\_exception tag and llvm.wasm.throw intrinsic for wasm exception support. This change also consolidates unwinder\_private\_data\_size definitions and aligns ARM EHABI implementations with the Itanium ABI where appropriate.

library/unwind · high confidence

Rewrite diagnostics infrastructure with new \`Diag\` and \`Emitter\` types

The \rustc\_errors\ crate has been completely refactored to use a new diagnostic architecture. The core diagnostic type is now \Diag\ (replacing the old \DiagnosticBuilder\), and emission is handled by a pluggable \Emitter\ trait implemented by \HumanEmitter\ (for human-readable output) and \JsonEmitter\ (for JSON output). The new system introduces \DiagInner\ for the diagnostic payload, \Subdiagnostic\ for structured sub-messages, and \IntoDiagArg\ for type-safe argument formatting. It also adds support for \annotate-snippets\ rendering, diagnostic deduplication via \DedupHashEncoder\, and early lint buffering through \LintBuffer\. This change modernizes how errors are constructed, formatted, and emitted, improving consistency and maintainability across the compiler.

_compiler/rustc\errors/src · high confidence

Rewritten macro-by-example engine with improved diagnostics and meta-variable expressions

The macro-by-example (MBE) engine has been rewritten to use a new NFA-based parser and a flat \MatcherLoc\ representation, replacing the previous recursive structure. This change introduces support for meta-variable expressions (such as \${concat(...)}\, \${count(...)}\, \${index(...)}\, and \${len(...)}\) in macro bodies, allowing users to manipulate matched fragments. It also brings significantly improved error reporting for macro matching failures, including better ambiguity detection, specific suggestions for missing commas, and clearer notes on why a macro failed to match. Additionally, the engine now supports attribute and derive rules for \macro\_rules!\ macros, enabling declarative macros to be used with \\#\[attr\]\ and \\#\[derive\]\ syntax.

_compiler/rustc\expand/src/mbe · high confidence

Rewritten metadata encoder and decoder with new lazy table format

The crate metadata (rmeta) encoding and decoding logic has been completely rewritten. The new implementation uses a lazy table format where data is encoded in post-order and decoded on-demand, significantly reducing memory usage during compilation. It introduces new structures like \LazyValue\, \LazyArray\, and \LazyTable\ for efficient random access to metadata without full deserialization. The encoder now uses \FileEncoder\ and \MemEncoder\ for better performance and flexibility, and the decoder supports \OwnedSlice\ for zero-copy access to metadata blobs. This change also updates the metadata version to 11 and changes the crate hash algorithm from SipHash-128 to XXH3-128 for faster hashing.

_compiler/rustc\metadata/src/rmeta · high confidence

Rust 2024 pattern migration lint and diagnostics

The compiler now includes a migration lint (\rust\_2024\_incompatible\_pat\) that warns about patterns relying on implicit borrowing (default binding modes) that will become errors in Rust 2024. This is implemented in the new \migration\ module within \rustc\_mir\_build::thir::pattern\, which tracks binding mode changes and emits machine-applicable suggestions to explicitly dereference or borrow. The \check\_match\ module now validates match expressions and let-bindings for irrefutability and reachability, while \const\_to\_pat\ handles the conversion of constants to patterns with improved error reporting for non-structural types.

_compiler/rustc\_mir\build/src/thir/pattern · high confidence

Rust compiler HIR analysis module restructured and expanded

The \rustc\_hir\_analysis\ crate has been significantly reorganized and expanded to support new language features and internal refactoring. New modules have been introduced: \autoderef.rs\ handles recursive dereferencing logic for both built-in pointers and the \Deref\/\Receiver\ traits; \check\_unused.rs\ implements linting for unused trait imports; \delegation.rs\ adds support for inheriting generic parameters and predicates in function delegation; and \constrained\_generic\_params.rs\ provides utilities for identifying and ordering type parameters constrained by impl headers. Existing functionality has been migrated or split, with well-formedness checks now residing in \hir\_wf\_check.rs\ and \impl\_wf\_check.rs\, and all diagnostic messages consolidated into \diagnostics.rs\. These changes underpin improvements in error reporting precision, support for delegation syntax, and better handling of generic parameter constraints.

_compiler/rustc\_hir\analysis/src · high confidence

Rust compiler proc-macro library restructured and modernized

The \compiler/rustc\_macros/src\ module has been completely rewritten to modernize the compiler's internal macro infrastructure. This change introduces new derive macros for serialization (\Encodable\, \Decodable\, \StableHash\) and type traversal (\TypeFoldable\, \TypeVisitable\, \Walkable\), replacing older implementations with more robust, generic-aware code generation. It also adds a new \extension\ attribute macro to automatically generate extension traits from impl blocks, and refactors the \query\ and \symbols\ macros to support new modifiers and environment-variable-based symbol values. These updates improve the determinism, performance, and maintainability of the compiler's internal data structures and query system.

_compiler/rustc\macros/src · high confidence

Rust-analyzer syntax crate refactored with immutable tree editing and new AST factory

The syntax crate has been completely rewritten to replace the previous mutable tree editing system with an immutable approach using \SyntaxEditor\ and \SyntaxFactory\. This change introduces a new \quote!\-like API for constructing AST nodes, migrates all code-assist operations (such as \inline\_local\_variable\, \fix\_visibility\, and \add\_missing\_match\_arms\) to use the new immutable editor, and updates the grammar definition in \rust.ungram\ to reflect the new node structure. Users benefit from more reliable syntax modifications and better performance due to the elimination of mutable tree shenanigans and deep clones during edits.

src/tools/rust-analyzer/crates/syntax · high confidence

Split out rustc\_hir\_id crate with deterministic def-path hashing

The \rustc\_hir\_id\ crate has been split out from \rustc\_hir\ to allow other compiler crates to depend on HIR ID types without pulling in the large \rustc\_hir\ dependency. This new crate introduces a deterministic encoding for definition path hashes, using a dedicated \DefPathHashMap\ for pre-parallel allocation and a sorted map for post-parallel allocation to ensure stable hash values across compiler invocations, which supports incremental compilation stability.

_compiler/rustc\_hir\id · high confidence

Stabilize THIR-based unsafety and tail-call checks

The compiler now performs unsafety and tail-call validation during THIR building (in \rustc\_mir\_build\) rather than in the MIR phase. This introduces dedicated checks for unsafe operations—including calls to \\#\[target\_feature\]\ functions, raw pointer dereferences, union field access, and mutable/extern static usage—along with stricter tail-call validation (e.g., ABI compatibility, \\#\[track\_caller\]\ constraints, and intrinsic restrictions). These checks are now enforced earlier in the compilation pipeline, providing more immediate feedback on unsafe code and tail-call correctness.

_compiler/rustc\_mir\build/src · high confidence

Stable panic handler implementation for compiler-builtins

The panic-handler crate in compiler-builtins is now stable, providing a default panic handler that loops indefinitely. This change removes the \no\_core\ feature and renames the internal implementation from \panic\_implementation\ to \panic\_handler\, ensuring consistent behavior for targets requiring a panic handler during testing.

library/compiler-builtins/crates/panic-handler · high confidence

Stricter validation of opaque type constraints in function signatures

The compiler now enforces that any function containing a TAIT (Type Alias Impl Trait) or opaque \impl Trait\ in its signature must actually define (constrain) that hidden type. This change introduces a new \opaque.rs\ module in \rustc\_hir\_analysis\ to explicitly check defining uses, ensuring that opaque types are not left unconstrained. If a function fails to constrain the opaque type, or if multiple functions define conflicting hidden types, the compiler emits an \UnconstrainedOpaqueType\ error. This prevents ambiguous or invalid opaque type definitions from silently succeeding or causing inconsistent inference results.

_compiler/rustc\_hir\_analysis/src/collect/type\of · high confidence

Support for dynamic lint diagnostics in early linting

Early linting now supports dynamic diagnostic generation via a new \DiagAndSess\ type in \compiler/rustc\_lint/src/early/diagnostics.rs\. This allows early lints to emit diagnostics using the modern \Diagnostic\ trait and closures, replacing the previous static \BuiltinLintDiag\ and \AttributeLintKind\ enum-based approach. Users benefit from more flexible and consistent error reporting for early-stage issues like malformed attributes and visibility warnings.

_compiler/rustc\lint/src/early · high confidence

Syntax-bridge crate split and macro expansion prettification improvements

The \syntax-bridge\ logic has been split into its own crate, providing a dedicated location for conversions between syntax nodes and token trees. This change introduces a new \prettify\_macro\_expansion\ utility that formats macro-expanded code for display, including better whitespace handling (such as adding spaces after commas) and the removal of internal \$crate\ identifiers from the output shown to users. Additionally, the bridge now supports per-token edition tracking to ensure correct parsing of edition-dependent syntax, and fixes a panic that occurred when splitting float literals during macro expansion.

src/tools/rust-analyzer/crates/syntax-bridge · high confidence

Token trees are now stored in a contiguous, compressed buffer with a new stateful cursor API

The \tt\ crate has been refactored to store token trees in a contiguous \Vec\ using a custom variable-length byte encoding and span compression, significantly reducing memory usage. This change introduces a new \Cursor\ type for stateful iteration over token trees and moves the previous iterator logic into a dedicated \TtIter\ module. The public API now exposes these new iteration primitives while maintaining the same \TokenTree\ data structure for macro input and output.

src/tools/rust-analyzer/crates/tt · high confidence

Variance analysis refactored into a new modular structure

The variance analysis logic in \rustc\_hir\_analysis\ has been reorganized into a new modular structure consisting of \terms.rs\, \constraints.rs\, \solve.rs\, and \dump.rs\. This change introduces a constraint-based approach where variance terms are built in an arena, constraints are gathered from the HIR, and a solver computes the final variance map. It also adds support for computing variances for opaque types (including RPITITs) and updates the \\#\[rustc\_dump\_variances\]\ and \\#!\[rustc\_dump\_variances\_of\_opaques\]\ attributes to work with the new implementation.

_compiler/rustc\_hir\analysis/src/variance · high confidence

Windows compatibility improvements and allocator configuration for rustc

The rustc binary now includes a Windows application manifest that enables UTF-8 code pages, declares support for Windows 7 through 11, and enables long-path awareness to remove legacy path limits. Additionally, the build system embeds Windows resources and configures the binary to use jemalloc as the global allocator via a lower-level override mechanism, ensuring consistent memory allocation across the Rust and LLVM boundaries.

compiler/rustc · high confidence

Windows resource files now include version metadata and allow custom resource compiler

The rustc build process on Windows now generates Windows resource files for rustc-main and rustc\_driver that embed file and product version information (such as FileDescription, FileVersion, ProductVersion, and ProductName) derived from the compiler's version string. This ensures that the resulting binaries display correct version details in Windows Explorer and system properties. Additionally, the resource compiler (rc.exe) can now be overridden by setting the RUSTC\_WINDOWS\_RC environment variable, allowing users to specify a custom resource compiler if needed.

_compiler/rustc\_windows\rc · high confidence

Windows-sys crate replaced with a dummy placeholder

The windows-sys crate in the library workspace has been replaced with a dummy implementation that prevents compilation. This change ensures that any code attempting to use the windows-sys crate will fail at compile time, effectively removing its functionality from the build.

library/windows-sys · high confidence

Fixes

6 commits (4 fixes) fixing compiler/rustc\_codegen\_gcc/tools

A fix in compiler/rustc\_codegen\_gcc/tools — 6 commits (4 fixs), 1 file: “Fix LLVM commit hash retrieval Use \rust-lang/llvm-project\ repository instead of the official one Return an \Err\ when an \info\ argument doesn't exist”; “Apply changes to fix python linting errors”; “Revert "Auto merge of \#159844 - GuillaumeGomez:subtree-update\_cg\_gcc\_2026-07-24, r=GuillaumeGomez"”; and 3 more (refs \#159844).

_compiler/rustc\_codegen\gcc/tools · medium confidence · unverified

7 commits (5 fixes) fixing src/tools/rust-analyzer/crates/hir-ide

A fix in src/tools/rust-analyzer/crates/hir-ide — 7 commits (5 fixs), 40 files: “Fix lowering of \yield\ in \async gen\”; “fix: emit assoc item bound only with generics on builtin derive”; “fix: Ensure r-a matches rustc coercion logic”; and 4 more.

src/tools/rust-analyzer/crates/hir-ide · medium confidence · unverified

Test coverage

15189 commits adding/updating tests in tests; 2 commits adding/updating tests in compiler/rustc\_codegen\_gcc/patches; 6 commits adding/updating tests in compiler/rustc\_codegen\_gcc/tests/asm; Add dedicated benchmarking and testing infrastructure for the alloc crate; Add exhaustive tests for VecCache bucket indexing and concurrency; Add test harness for pattern analysis; Add tests for Interned interning behavior; Add tests for OwnedSlice; Add tests for base-n encoding functions; Added UI tests for module directory resolution and polymorphism; Added assembly output and runtime regression tests for the GCC codegen backend; Added regression test for nested module path attribute handling; Added regression test for same crate and macro name resolution; Added regression tests for memory usage and x86-interrupt ABI; Added run-make test for wasm-exceptions in no\_std environments; Added run-make tests for rustdoc output and example scraping; Added tests for JSON emitter span position accuracy; Added tests for block and line doc comment beautification; Added tests for cross-language LLVM CFI with \cfi\_types\ and integer normalization; Added tests for incremental compilation file system persistence; Added tests for index size optimization and range iterator behavior; Added tests for module suggestion diagnostics; Added tests for pattern analysis complexity, exhaustiveness, and intersections; Added tests for run-make-cargo scenarios; Added tests for symbol duplication detection; Added tests for the rustc --explain markdown parser and terminal output; Added unit tests for TransitiveRelation; Added unit tests for the Version feature; Expanded rustdoc-gui test suite with new regression and feature tests; Expanded test coverage for the GCC codegen backend; ExternAbi parsing and validation tests added; New BitSet implementations and tests; New comprehensive test harness for compiler-builtins math functions; New intrinsic verification test crate for compiler-builtins.

Dependencies

8259 commits updating dependencies (380 manifests)

A dependency / build maintenance change in (dependencies) — 8259 commits (400 fixs), 380 files: “Update libssh2-sys”; “Scope trait TextLen just for primitives”; “Pin \cc\ version”; and 6884 more (refs \#3870, \#513, \#138084, \#418, \#111538, …).

(dependencies) · high confidence · unverified

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

How this codebase got here

Score

  • CAI 48 → 47 (-0.9)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.4) — scores are not directly comparable.

Lenses

  • Code Health 41 → 40 (-0.7)
  • Architecture 65 → 64 (-1.3)
  • Maturity 75 → 76 (+0.6)
  • Readiness 54 → 54 (-0.1)
  • Security 44 → 40 (-4.0)
  • Domain Modelling 100 → 100 (+0.0)
  • Event Sourcing 100 → 100 (+0.0)
  • Accessibility 54 → 62 (+8.0)
  • Performance 97 → 97 (+0.0)

Resolved (599)

  • Builder::codegen_llvm_intrinsic_call (cognitive 19) (compiler/rustc_codegen_gcc/src/intrinsic/mod.rs)
  • Builder::codegen_llvm_intrinsic_call (cognitive 22) (compiler/rustc_codegen_llvm/src/intrinsic.rs)
  • Change coupling: context.rs ↔ mod.rs (compiler/rustc_infer/src/infer/context.rs)
  • Change-coupling hub: builtin_attrs.rs → data_structures.rs, encode_cross_crate.rs, check_attr.rs (compiler/rustc_feature/src/builtin_attrs.rs)
  • ClassTooLong: Completions (src/tools/rust-analyzer/crates/ide-completion/src/completions.rs)
  • DecimalLiteralRepresentation::do_lint (cognitive 23) (src/tools/clippy/clippy_lints/src/literal_representation.rs)
  • DecimalLiteralRepresentation::do_lint (cyclomatic 20) (src/tools/clippy/clippy_lints/src/literal_representation.rs)
  • DisallowedFields::check_pat (cognitive 22) (src/tools/clippy/clippy_lints/src/disallowed_fields.rs)
  • DuplicateLangItem::into_diag (cognitive 16) (compiler/rustc_passes/src/diagnostics.rs)
  • Duplicated block (10 lines × 11) (compiler/rustc_codegen_cranelift/src/intrinsics/mod.rs)
  • Duplicated block (10 lines × 2) (compiler/rustc_builtin_macros/src/asm.rs)
  • Duplicated block (10 lines × 2) (compiler/rustc_codegen_cranelift/example/dst-field-align.rs)
  • Duplicated block (10 lines × 2) (compiler/rustc_codegen_cranelift/src/intrinsics/mod.rs)
  • Duplicated block (10 lines × 2) (compiler/rustc_codegen_cranelift/src/intrinsics/mod.rs)
  • Duplicated block (10 lines × 2) (compiler/rustc_codegen_gcc/build_system/src/fuzz.rs)
  • Duplicated block (10 lines × 2) (compiler/rustc_codegen_llvm/src/builder.rs)
  • Duplicated block (10 lines × 2) (compiler/rustc_resolve/src/ident.rs)
  • Duplicated block (10 lines × 2) (compiler/rustc_target/src/callconv/powerpc.rs)
  • Duplicated block (10 lines × 7) (library/std/src/os/xous/ffi.rs)
  • Duplicated block (10–11 lines × 2) (compiler/rustc_mir_dataflow/src/impls/storage_liveness.rs)
  • …and 579 more

New (3589)

  • AWS access key ID with no secret key beside it (.github/workflows/ci.yml)
  • AWS access key ID with no secret key beside it (.github/workflows/ci.yml)
  • AWS access key ID with no secret key beside it (.github/workflows/ci.yml)
  • AWS access key ID with no secret key beside it (.github/workflows/ci.yml)
  • AWS access key ID with no secret key beside it (.travis.yml)
  • AWS access key ID with no secret key beside it (.travis.yml)
  • AWS access key ID with no secret key beside it (.travis.yml)
  • AWS access key ID with no secret key beside it (appveyor.yml)
  • AWS access key ID with no secret key beside it (appveyor.yml)
  • AWS access key ID with no secret key beside it (appveyor.yml)
  • AWS access key ID with no secret key beside it (src/ci/github-actions/ci.yml)
  • AWS access key ID with no secret key beside it (src/ci/github-actions/ci.yml)
  • AWS access key ID with no secret key beside it (src/ci/github-actions/ci.yml)
  • AWS access key ID with no secret key beside it (src/ci/github-actions/ci.yml)
  • AWS access key ID with no secret key beside it (src/ci/github-actions/jobs.yml)
  • AWS access key ID with no secret key beside it (src/ci/github-actions/jobs.yml)
  • AWS access key ID with no secret key beside it (src/ci/github-actions/jobs.yml)
  • AWS access key ID with no secret key beside it (src/ci/github-actions/jobs.yml)
  • Args::parse (cyclomatic 18) (src/tools/clippy/src/main.rs)
  • Builder::fptoint_sat (cyclomatic 16) (compiler/rustc_codegen_gcc/src/builder.rs)
  • …and 3569 more

Changes since last survey

  • 300 commits — 272 feature/other, 28 fixes

By area

  • (repo) — 137 commits
  • tests/ui — 38 commits
  • src/tools — 13 commits
  • library/std — 11 commits
  • compiler/rustc_codegen_llvm — 9 commits
  • (root) — 7 commits
  • src/bootstrap — 7 commits
  • compiler/rustc_attr_ir — 5 commits
  • compiler/rustc_next_trait_solver — 5 commits
  • tests/mir-opt — 5 commits
  • clippy_lints/src — 4 commits
  • compiler/rustc_data_structures — 4 commits
  • compiler/rustc_mir_build — 4 commits
  • library/core — 4 commits
  • src/ci — 4 commits
  • compiler/rustc_ast — 3 commits
  • tests/codegen-llvm — 3 commits
  • compiler/rustc_attr_parsing — 2 commits
  • compiler/rustc_builtin_macros — 2 commits
  • compiler/rustc_codegen_ssa — 2 commits

Notable commits

  • fix: Add a regression test for fixed next-solver ICE
  • fix: Add regression test for HRTB projection bound with TryFrom error
  • fix: Add regression test with multiple diagnostics
  • fix: Auto merge of #164707 - marcpems:fix/static-llvm-pgo-training, r=Kobzol
  • fix: Fix incorrect span to point at private item that should be marked pub
  • fix: Fix inverted wasm cfg in core benchmarks
  • fix: Fix: fast path for rustdoc
  • fix: Merge pull request #5537 from programskillforverification/fix-len-arg-ice
  • fix: My changes for the LLVM fix
  • fix: Revert "Auto merge of 164014 - Jules-Bertholet:no-noop-reborrows, r=oli-obk"
  • fix: Revert "Auto merge of 164014 - Jules-Bertholet:no-noop-reborrows, r=oli-obk"
  • fix: Revert "fix incorrect byte count suffix on MSVC"
  • fix: Rollup merge of #164217 - tehforsch:fix-160621, r=mejrs,mu001999
  • fix: Rollup merge of #164218 - estebank:priv-span-fix, r=tiif
  • fix: Rollup merge of #164864 - darkraider01:fix-early-otherwise-branch-164765, r=dianqk
  • fix: Rollup merge of #165053 - beetrees:fix-debuginfo-poison-place-ref, r=dianqk
  • fix: Rollup merge of #165458 - paradoxicalguy:fix-msvc-byte-count-clean, r=folkertdev
  • fix: Rollup merge of #165646 - malezjaa:fix-from_field_count, r=workingjubilee
  • fix: Rollup merge of #165726 - yotamofek:fix-search-button-sidebar-anchor, r=GuillaumeGomez
  • fix: Rollup merge of #165771 - paradoxicalguy:msvc-lto-preserve-regression, r=folkertdev
  • …and 280 more

Architecture

  • Unchanged — 0 containers · 1 contexts · 0 edges

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

Survey your own repository

rust-lang/rust 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 14 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 5f4effd579500175af844241eb179e756190f1e7 — the exact code this score is about.
  • Scored under rubric-2026.11.4 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.65+preprod-36d4cd83012f.