A Rust compiler front-end for IDEs
This report summarizes scanner evidence for rust-lang/rust-analyzer, a Rust project with 16,959 GitHub stars. SynthScan examined 615,350 lines of code across 1790 source files, recording 962 pattern matches distributed across 11 syntactic categories. The legacy adjusted pattern signal is 1.7 (Low pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Payload schema: 1.0.0 · Engine: 2.0.0 · Scoring: heuristic-density-v1 · Scan date: 2026-10-31.
Can maintainers explain intent, assumptions, and trade-offs? 942 finding(s).
Are imports declared and package/API names verified? 6 finding(s).
Are wrappers, guards, and repeated structures necessary? 30 finding(s).
Which changes need focused human review? 962 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 962 distinct pattern matches across 11 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | Cargo.toml | 201 | # subjective | COMMENT |
| LOW | crates/hir-def/src/item_scope.rs | 141 | unnamed_consts: ThinVec<ConstId>, | COMMENT |
| LOW | crates/hir-def/src/import_map.rs | 21 | COMMENT | |
| LOW | crates/hir-def/src/dyn_map.rs | 1 | //! This module defines a `DynMap` -- a container for heterogeneous maps. | COMMENT |
| LOW | crates/hir-def/src/expr_store.rs | 121 | /// top level expression, it will not be listed in here. | COMMENT |
| LOW | crates/hir-def/src/expr_store.rs | 141 | /// // this repeat expr is anon const #1, and *only it* appears in this list. | COMMENT |
| LOW | crates/hir-def/src/expr_store.rs | 301 | COMMENT | |
| LOW | crates/hir-def/src/lib.rs | 1 | //! `hir_def` crate contains everything between macro expansion and type | COMMENT |
| LOW | crates/hir-def/src/lib.rs | 541 | #[derive(PartialOrd, Ord)] | COMMENT |
| LOW | crates/hir-def/src/lib.rs | 1181 | pub trait HasModule { | COMMENT |
| LOW | crates/hir-def/src/lib.rs | 1221 | // N: ItemTreeModItemNode, | COMMENT |
| LOW | crates/hir-def/src/lib.rs | 1481 | } | COMMENT |
| LOW | crates/hir-def/src/lib.rs | 1501 | // which means the trait itself may still be flyimported but its methods won't, and | COMMENT |
| LOW | crates/hir-def/src/hir.rs | 1 | //! This module describes hir-level representation of expressions. | COMMENT |
| LOW | crates/hir-def/src/item_tree.rs | 1 | //! A simplified AST that only contains items. | COMMENT |
| LOW | crates/hir-def/src/item_tree.rs | 21 | //! resolution has not yet been performed. `ItemTree`s are per-file, while rustc's AST and HIR are | COMMENT |
| LOW | crates/hir-def/src/nameres.rs | 1 | //! This module implements import-resolution/macro expansion algorithm. | COMMENT |
| LOW | crates/hir-def/src/nameres.rs | 21 | //! | COMMENT |
| LOW | crates/hir-def/src/nameres.rs | 161 | COMMENT | |
| LOW | crates/hir-def/src/nameres.rs | 181 | /// The prelude module for this crate. This either comes from an import | COMMENT |
| LOW | crates/hir-def/src/attrs.rs | 1 | //! Attributes for anything that is not name resolution. | COMMENT |
| LOW | crates/hir-def/src/resolver.rs | 581 | /// tells for each ident what it resolves to. | COMMENT |
| LOW | crates/hir-def/src/resolver.rs | 601 | /// The shadowing is accounted for: in | COMMENT |
| LOW | crates/hir-def/src/macro_expansion_tests/mbe.rs | 541 | // STMT_LIST@7..17 | COMMENT |
| LOW | crates/hir-def/src/macro_expansion_tests/mbe.rs | 661 | // L_CURLY@9..10 "{" | COMMENT |
| LOW | crates/hir-def/src/macro_expansion_tests/mbe.rs | 741 | a = 10+1; | COMMENT |
| LOW | crates/hir-def/src/macro_expansion_tests/mbe.rs | 761 | // BIN_EXPR@9..13 | COMMENT |
| LOW | crates/hir-def/src/macro_expansion_tests/mbe.rs | 1741 | K::(C("0")); | COMMENT |
| LOW | crates/hir-def/src/macro_expansion_tests/mbe.rs | 1761 | // IDENT@6..7 "K" | COMMENT |
| LOW | crates/hir-def/src/macro_expansion_tests/proc_macros.rs | 1 | //! Tests for user-defined procedural macros. | COMMENT |
| LOW | crates/hir-def/src/macro_expansion_tests/proc_macros.rs | 41 | #![cfg_attr(true, doc = "123...", attr2)] | COMMENT |
| LOW | crates/hir-def/src/macro_expansion_tests/proc_macros.rs | 61 | ); | COMMENT |
| LOW | …es/hir-def/src/macro_expansion_tests/mbe/regression.rs | 941 | // PARAM_LIST@8..10 | COMMENT |
| LOW | …es/hir-def/src/macro_expansion_tests/mbe/regression.rs | 961 | // GENERIC_ARG_LIST@22..28 | COMMENT |
| LOW | crates/hir-def/src/attrs/docs.rs | 41 | } | COMMENT |
| LOW | crates/hir-def/src/attrs/docs.rs | 241 | self.push_doc_lines(doc, Some(offset_in_ast), comment_kind, indent); | COMMENT |
| LOW | crates/hir-def/src/expr_store/body.rs | 61 | /// An item body together with the mapping from syntax nodes to HIR expression | COMMENT |
| LOW | crates/hir-def/src/expr_store/path.rs | 61 | /// This specifies whether the args contain a Self type as the first | COMMENT |
| LOW | crates/hir-def/src/expr_store/lower.rs | 1101 | body: ExprId, | COMMENT |
| LOW | crates/hir-def/src/expr_store/lower.rs | 2381 | /// } | COMMENT |
| LOW | crates/hir-def/src/expr_store/lower.rs | 2421 | syntax_ptr, | COMMENT |
| LOW | crates/hir-def/src/expr_store/lower.rs | 2521 | syntax_ptr, | COMMENT |
| LOW | crates/hir-def/src/nameres/collector.rs | 241 | unresolved_imports: Vec<ImportDirective>, | COMMENT |
| LOW | crates/hir-def/src/nameres/collector.rs | 601 | } | COMMENT |
| LOW | crates/hir-def/src/nameres/collector.rs | 661 | /// mod m { macro_rules! foo { () => {} } } | COMMENT |
| LOW | crates/hir-def/src/nameres/collector.rs | 701 | COMMENT | |
| LOW | crates/hir-def/src/nameres/path_resolution.rs | 1 | //! This module implements a function to resolve a path `foo::bar::baz` to a | COMMENT |
| LOW | crates/hir-def/src/nameres/tests/incremental.rs | 321 | "file_item_tree_query", | COMMENT |
| LOW | crates/hir-def/src/nameres/tests/incremental.rs | 341 | // $0 | COMMENT |
| LOW | crates/hir-def/src/nameres/tests/incremental.rs | 461 | COMMENT | |
| LOW | crates/hir-def/src/item_tree/attrs.rs | 121 | // - If `self` and `other` are both `AttrsOrCfg::Enabled`, the result is a new | COMMENT |
| LOW | crates/base-db/src/input.rs | 81 | COMMENT | |
| LOW | crates/base-db/src/input.rs | 381 | /// information needs to be recomputed. | COMMENT |
| LOW | crates/base-db/src/input.rs | 501 | pub data: BuiltCrateData, | COMMENT |
| LOW | crates/base-db/src/input.rs | 981 | /// rust-analyzer will continue working OK in the presence of cycle, | COMMENT |
| LOW | crates/hir-ty/src/variance.rs | 1 | //! Module for inferring the variance of type and lifetime parameters. See the [rustc dev guide] | COMMENT |
| LOW | crates/hir-ty/src/specialization.rs | 21 | // cannot create a cycle, but a cycle handler is required nevertheless. | COMMENT |
| LOW | crates/hir-ty/src/infer.rs | 1 | //! Type inference, i.e. the process of walking through the code and determining | COMMENT |
| LOW | crates/hir-ty/src/infer.rs | 561 | /// | COMMENT |
| LOW | crates/hir-ty/src/infer.rs | 581 | /// Borrow(AutoBorrow::Ref) -> &[i32; 4], | COMMENT |
| 849 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| CRITICAL | crates/hir-ty/src/infer/coerce.rs | 1094 | if !coerce.delegate.0.result.expr_adjustments.contains_key(&new) { | CODE |
| CRITICAL | crates/hir-ty/src/next_solver/infer/snapshot/fudge.rs | 186 | let idx = vid.as_usize() - self.snapshot_vars.type_vars.0.start.as_usize(); | CODE |
| CRITICAL | crates/hir-ty/src/next_solver/infer/snapshot/fudge.rs | 231 | let idx = vid.index() - self.snapshot_vars.region_vars.0.start.index(); | CODE |
| CRITICAL | crates/hir-ty/src/next_solver/infer/snapshot/fudge.rs | 247 | let idx = vid.index() - self.snapshot_vars.const_vars.0.start.index(); | CODE |
| CRITICAL | crates/hir-ty/src/lower/path.rs | 814 | GenericParamId::ConstParamId(_) => self.ctx.ctx.types.consts.error.into(), | CODE |
| CRITICAL | crates/hir-ty/src/lower/path.rs | 815 | GenericParamId::LifetimeParamId(_) => self.ctx.ctx.types.regions.error.into(), | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | editors/code/src/commands.ts | 567 | function predicateEvaluationValidationMessage( | CODE |
| LOW | editors/code/src/commands.ts | 614 | function viewFileUsingTextDocumentContentProvider( | CODE |
| LOW | editors/code/src/commands.ts | 1197 | export function applySnippetWorkspaceEditCommand(_ctx: CtxInit): Cmd { | CODE |
| LOW | editors/code/src/main.ts | 241 | function checkConflictingExtensions() { | CODE |
| LOW | editors/code/src/toolchain.ts | 177 | async function getPathForExecutableWithEnv( | CODE |
| LOW | editors/code/src/snippets.ts | 7 | export async function applySnippetWorkspaceEdit( | CODE |
| LOW | editors/code/src/debug.ts | 410 | async function recompileTestFromDebuggingSession(session: vscode.DebugSession, ctx: Ctx) { | CODE |
| LOW | editors/code/src/debug.ts | 432 | export function initializeDebugSessionTrackingAndRebuild(ctx: Ctx) { | CODE |
| LOW | editors/code/src/client.ts | 372 | function assertIsCodeActionWithoutEditsAndCommands( | CODE |
| LOW | editors/code/src/config.ts | 561 | function substituteVSCodeVariableInString(val: string): string { | CODE |
| LOW | editors/code/src/new_project.ts | 84 | async function promptForNewProjectTemplate(): Promise<NewProjectKind | undefined> { | CODE |
| LOW | editors/code/src/new_project.ts | 91 | async function promptForNewProjectParentFolder(): Promise<vscode.Uri | undefined> { | CODE |
| LOW | editors/code/src/new_project.ts | 238 | export function determineNewProjectOpenAction( | CODE |
| LOW | editors/code/src/new_project.ts | 255 | async function promptForNewProjectOpenAction( | CODE |
| LOW | editors/code/src/new_project.ts | 284 | async function executeNewProjectOpenAction( | CODE |
| LOW | editors/code/src/bootstrap.ts | 191 | async function hasToolchainFileWithRaDeclared(uri: vscode.Uri): Promise<boolean> { | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM⚡ | crates/ide/src/extend_selection.rs | 665 | r#"fn main() { let x = "═$0═══════"; }"#, | CODE |
| MEDIUM⚡ | crates/ide/src/extend_selection.rs | 667 | r#""════════""#, | CODE |
| MEDIUM⚡ | crates/ide/src/extend_selection.rs | 668 | r#"let x = "════════";"#, | CODE |
| MEDIUM⚡ | crates/ide/src/extend_selection.rs | 669 | r#"{ let x = "════════"; }"#, | CODE |
| MEDIUM⚡ | crates/ide/src/extend_selection.rs | 670 | r#"fn main() { let x = "════════"; }"#, | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | crates/hir-ty/src/next_solver/ty.rs | 353 | // Definitely absolutely not copy. | COMMENT |
| MEDIUM | crates/ide-assists/src/lib.rs | 40 | //! * Make assists robust. If the assist depends on results of type-inference too | COMMENT |
| MEDIUM | crates/rust-analyzer/src/config.rs | 1012 | /// [custom test harness](https://doc.rust-lang.org/cargo/reference/cargo-targets.html#the-harness-field), | COMMENT |
| LOW | crates/hir-expand/src/builtin/derive_macro.rs | 1202 | // Regardless of the only type param being designed as `#[pointee]` or not, we can just use it as such. | COMMENT |
| MEDIUM | editors/code/package-lock.json | 6159 | "resolved": "https://registry.npmjs.org/robust-predicates/-/robust-predicates-3.0.2.tgz", | CODE |
| MEDIUM | editors/code/package.json | 3023 | "markdownDescription": "Additional arguments to be passed through Cargo to launched tests, bench | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | lib/smol_str/src/gdb_smolstr_printer.py | 32 | except Exception: | CODE |
| LOW | lib/smol_str/src/gdb_smolstr_printer.py | 54 | except Exception: | CODE |
| LOW | lib/smol_str/src/gdb_smolstr_printer.py | 71 | except Exception as e: | CODE |
| LOW | lib/smol_str/src/gdb_smolstr_printer.py | 78 | except Exception as e: | CODE |
| LOW | lib/smol_str/src/gdb_smolstr_printer.py | 97 | except Exception as e: | CODE |
| LOW | lib/smol_str/src/gdb_smolstr_printer.py | 117 | except Exception: | CODE |
| MEDIUM | lib/smol_str/src/gdb_smolstr_printer.py | 29 | def _read_utf8(mem): | CODE |
| MEDIUM | lib/smol_str/src/gdb_smolstr_printer.py | 51 | def to_string(self): | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | …s/ide-assists/src/handlers/add_missing_impl_members.rs | 19 | // Adds scaffold for required impl members. | COMMENT |
| MEDIUM | …s/ide-assists/src/handlers/add_missing_impl_members.rs | 64 | // Adds scaffold for overriding default impl members. | COMMENT |
| MEDIUM | lib/lsp-server/src/lib.rs | 1 | //! A language server scaffold, exposing a synchronous crossbeam-channel based API. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | crates/hir-ty/src/infer.rs | 1636 | // don't forget to handle them here. | COMMENT |
| LOW | crates/ide/src/typing.rs | 36 | // Don't forget to add new trigger characters to `server_capabilities` in `caps.rs`. | COMMENT |
| LOW | crates/ide/src/syntax_highlighting/tags.rs | 44 | // Don't forget to adjust the feature description in crates/ide/src/syntax_highlighting.rs. | COMMENT |
| LOW | …s/src/handlers/convert_named_struct_to_tuple_struct.rs | 60 | // are to lift this limitation, don't forget to make `edit_struct_def()` consider macro files | COMMENT |
| LOW | .vscode/launch.json | 105 | // Don't forget to set `debug = 2` in `Cargo.toml` before building the server | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | lib/smol_str/src/gdb_smolstr_printer.py | 117 | except Exception: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | Cargo.toml | 30 | # Set this to 1 or 2 to get more useful backtraces in debugger. | COMMENT |
| LOW | .github/workflows/ci.yaml | 364 | # Check if all jobs that we depend on (in the needs array) were successful (or have been skipped). | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | crates/syntax/src/ast/token_ext.rs | 346 | // NOTE: This method should only be used for highlighting ranges. The unescaped | COMMENT |