An interpreter for Rust's mid-level intermediate representation
This report summarizes scanner evidence for rust-lang/miri, a Rust project with 6,650 GitHub stars. SynthScan examined 135,064 lines of code across 1502 source files, recording 520 pattern matches distributed across 10 syntactic categories. The legacy adjusted pattern signal is 8.6 (Moderate 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.
Can maintainers explain intent, assumptions, and trade-offs? 345 finding(s).
Are imports declared and package/API names verified? 1 finding(s).
Are wrappers, guards, and repeated structures necessary? 175 finding(s).
Which changes need focused human review? 520 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 520 distinct pattern matches across 10 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 |
|---|---|---|---|---|
| MEDIUM⚡ | …ee_borrows/wildcard/cross_tree_update_newer_exposed.rs | 21 | // ┌──────────────┐ | COMMENT |
| MEDIUM⚡ | …ee_borrows/wildcard/cross_tree_update_newer_exposed.rs | 25 | // └──────────────┘ │ │ | COMMENT |
| MEDIUM⚡ | …ee_borrows/wildcard/cross_tree_update_newer_exposed.rs | 29 | // ┌────────────┐ ┌────────────┐ | COMMENT |
| MEDIUM⚡ | …ee_borrows/wildcard/cross_tree_update_newer_exposed.rs | 33 | // └──────┬─────┘ └────────────┘ | COMMENT |
| MEDIUM⚡ | …ee_borrows/wildcard/cross_tree_update_newer_exposed.rs | 37 | // ┌────────────┐ | COMMENT |
| MEDIUM⚡ | …ee_borrows/wildcard/cross_tree_update_newer_exposed.rs | 41 | // └────────────┘ | COMMENT |
| MEDIUM⚡ | …rows/wildcard/subtree_internal_relatedness_wildcard.rs | 19 | // ┌──────────────┐ | COMMENT |
| MEDIUM⚡ | …rows/wildcard/subtree_internal_relatedness_wildcard.rs | 23 | // └──────────────┘ │ | COMMENT |
| MEDIUM⚡ | …rows/wildcard/subtree_internal_relatedness_wildcard.rs | 27 | // ┌────────────┐ | COMMENT |
| MEDIUM⚡ | …rows/wildcard/subtree_internal_relatedness_wildcard.rs | 29 | // │ reb(Res) ├───────────┐ | COMMENT |
| MEDIUM⚡ | …rows/wildcard/subtree_internal_relatedness_wildcard.rs | 31 | // └──────┬─────┘ │ | COMMENT |
| MEDIUM⚡ | …rows/wildcard/subtree_internal_relatedness_wildcard.rs | 35 | // ┌────────────┐ ┌───────────┐ | COMMENT |
| MEDIUM⚡ | …rows/wildcard/subtree_internal_relatedness_wildcard.rs | 39 | // └────────────┘ └───────────┘ | COMMENT |
| MEDIUM⚡ | …s/fail/tree_borrows/wildcard/single_exposed_disable.rs | 15 | // ┌────────────┐ | COMMENT |
| MEDIUM⚡ | …s/fail/tree_borrows/wildcard/single_exposed_disable.rs | 17 | // │ ptr_base ├───────────┐ | COMMENT |
| MEDIUM⚡ | …s/fail/tree_borrows/wildcard/single_exposed_disable.rs | 19 | // └──────┬─────┘ │ | COMMENT |
| MEDIUM⚡ | …s/fail/tree_borrows/wildcard/single_exposed_disable.rs | 23 | // ┌────────────┐ ┌───────────┐ | COMMENT |
| MEDIUM⚡ | …s/fail/tree_borrows/wildcard/single_exposed_disable.rs | 27 | // └────────────┘ └───────────┘ | COMMENT |
| MEDIUM⚡ | …_borrows/wildcard/multi_exposed_child_unique_writer.rs | 19 | // ┌────────────┐ | COMMENT |
| MEDIUM⚡ | …_borrows/wildcard/multi_exposed_child_unique_writer.rs | 23 | // └──────┬─────┘ | COMMENT |
| MEDIUM⚡ | …_borrows/wildcard/multi_exposed_child_unique_writer.rs | 27 | // ┌────────────┐ | COMMENT |
| MEDIUM⚡ | …_borrows/wildcard/multi_exposed_child_unique_writer.rs | 31 | // └──────┬─────┘ | COMMENT |
| MEDIUM⚡ | …_borrows/wildcard/multi_exposed_child_unique_writer.rs | 35 | // ┌────────────┐ | COMMENT |
| MEDIUM⚡ | …_borrows/wildcard/multi_exposed_child_unique_writer.rs | 39 | // └────────────┘ | COMMENT |
| MEDIUM⚡ | …ree_borrows/wildcard/multi_exposed_siblings_foreign.rs | 19 | // ┌────────────┐ | COMMENT |
| MEDIUM⚡ | …ree_borrows/wildcard/multi_exposed_siblings_foreign.rs | 21 | // │ ptr_base ├──────────────┬───────────────────┐ | COMMENT |
| MEDIUM⚡ | …ree_borrows/wildcard/multi_exposed_siblings_foreign.rs | 23 | // └──────┬─────┘ │ │ | COMMENT |
| MEDIUM⚡ | …ree_borrows/wildcard/multi_exposed_siblings_foreign.rs | 27 | // ┌────────────┐ ┌────────────┐ ┌───────────┐ | COMMENT |
| MEDIUM⚡ | …ree_borrows/wildcard/multi_exposed_siblings_foreign.rs | 31 | // └────────────┘ └────────────┘ └───────────┘ | COMMENT |
| MEDIUM⚡ | …ree_borrows/wildcard/multi_exposed_siblings_disable.rs | 19 | // ┌────────────┐ | COMMENT |
| MEDIUM⚡ | …ree_borrows/wildcard/multi_exposed_siblings_disable.rs | 21 | // │ ptr_base ├──────────────┬───────────────────┐ | COMMENT |
| MEDIUM⚡ | …ree_borrows/wildcard/multi_exposed_siblings_disable.rs | 23 | // └──────┬─────┘ │ │ | COMMENT |
| MEDIUM⚡ | …ree_borrows/wildcard/multi_exposed_siblings_disable.rs | 27 | // ┌────────────┐ ┌────────────┐ ┌───────────┐ | COMMENT |
| MEDIUM⚡ | …ree_borrows/wildcard/multi_exposed_siblings_disable.rs | 31 | // └────────────┘ └────────────┘ └───────────┘ | COMMENT |
| MEDIUM⚡ | …s/fail/tree_borrows/wildcard/single_exposed_foreign.rs | 15 | // ┌────────────┐ | COMMENT |
| MEDIUM⚡ | …s/fail/tree_borrows/wildcard/single_exposed_foreign.rs | 17 | // │ ptr_base ├───────────┐ | COMMENT |
| MEDIUM⚡ | …s/fail/tree_borrows/wildcard/single_exposed_foreign.rs | 19 | // └──────┬─────┘ │ | COMMENT |
| MEDIUM⚡ | …s/fail/tree_borrows/wildcard/single_exposed_foreign.rs | 23 | // ┌────────────┐ ┌───────────┐ | COMMENT |
| MEDIUM⚡ | …s/fail/tree_borrows/wildcard/single_exposed_foreign.rs | 27 | // └────────────┘ └───────────┘ | COMMENT |
| MEDIUM⚡ | …/tree_borrows/wildcard/subtree_internal_relatedness.rs | 18 | // ┌──────────────┐ | COMMENT |
| MEDIUM⚡ | …/tree_borrows/wildcard/subtree_internal_relatedness.rs | 22 | // └──────────────┘ │ | COMMENT |
| MEDIUM⚡ | …/tree_borrows/wildcard/subtree_internal_relatedness.rs | 26 | // ┌────────────┐ | COMMENT |
| MEDIUM⚡ | …/tree_borrows/wildcard/subtree_internal_relatedness.rs | 28 | // │ reb(Res) ├───────────┐ | COMMENT |
| MEDIUM⚡ | …/tree_borrows/wildcard/subtree_internal_relatedness.rs | 30 | // └──────┬─────┘ │ | COMMENT |
| MEDIUM⚡ | …/tree_borrows/wildcard/subtree_internal_relatedness.rs | 34 | // ┌────────────┐ ┌───────────┐ | COMMENT |
| MEDIUM⚡ | …/tree_borrows/wildcard/subtree_internal_relatedness.rs | 38 | // └────────────┘ └───────────┘ | COMMENT |
| MEDIUM⚡ | tests/fail/tree_borrows/wildcard/protector_release.rs | 37 | // ┌───────────┐ | COMMENT |
| MEDIUM⚡ | tests/fail/tree_borrows/wildcard/protector_release.rs | 40 | // └─────┬─────┘ │ | COMMENT |
| MEDIUM⚡ | tests/fail/tree_borrows/wildcard/protector_release.rs | 44 | // ┌───────────┐ ┌───────────┐ | COMMENT |
| MEDIUM⚡ | tests/fail/tree_borrows/wildcard/protector_release.rs | 47 | // └─────┬─────┘ └─────┬─────┘ | COMMENT |
| MEDIUM⚡ | tests/fail/tree_borrows/wildcard/protector_release.rs | 51 | // ┌───────────┐ ┌───────────┐ | COMMENT |
| MEDIUM⚡ | tests/fail/tree_borrows/wildcard/protector_release.rs | 54 | // └─────┬─────┘ └───────────┘ | COMMENT |
| MEDIUM⚡ | tests/fail/tree_borrows/wildcard/protector_release.rs | 58 | // ┌───────────┐ | COMMENT |
| MEDIUM⚡ | tests/fail/tree_borrows/wildcard/protector_release.rs | 61 | // └───────────┘ | COMMENT |
| MEDIUM⚡ | …ws/wildcard/cross_tree_update_main_invalid_exposed2.rs | 30 | // ┌──────────────┐ | COMMENT |
| MEDIUM⚡ | …ws/wildcard/cross_tree_update_main_invalid_exposed2.rs | 32 | // │ptr_base(Act) ├───────────┬──────────────────┐ * | COMMENT |
| MEDIUM⚡ | …ws/wildcard/cross_tree_update_main_invalid_exposed2.rs | 34 | // └──────┬───────┘ │ │ │ | COMMENT |
| MEDIUM⚡ | …ws/wildcard/cross_tree_update_main_invalid_exposed2.rs | 38 | // ┌─────────────┐ ┌────────────┐ ┌────────────┐ ┌───────────┐ | COMMENT |
| MEDIUM⚡ | …ws/wildcard/cross_tree_update_main_invalid_exposed2.rs | 42 | // └─────────────┘ └────────────┘ └────────────┘ └───────────┘ | COMMENT |
| MEDIUM⚡ | …sts/fail/tree_borrows/wildcard/cross_tree_from_main.rs | 17 | // ┌────────────┐ | COMMENT |
| 114 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | CONTRIBUTING.md | 121 | ```toml | COMMENT |
| LOW | test-cargo-miri/subcrate/src/lib.rs | 1 | /// Doc-test test | COMMENT |
| LOW | test-cargo-miri/issue-rust-86261/src/lib.rs | 1 | #![allow(unused_imports, unused_attributes)] | COMMENT |
| LOW | test-cargo-miri/src/lib.rs | 1 | /// Doc-test test | COMMENT |
| LOW | test-cargo-miri/src/lib.rs | 21 | /// ```rust,compile_fail | COMMENT |
| LOW | tests/fail/no_main.rs | 1 | //@error-in-other-file: Miri can only run programs that have a main function. | COMMENT |
| LOW | tests/fail/tree_borrows/reservedim_spurious_write.rs | 1 | // Illustrating a problematic interaction between Reserved, interior mutability, | COMMENT |
| LOW | tests/fail/tree_borrows/protector-write-lazy.rs | 1 | //@compile-flags: -Zmiri-tree-borrows | COMMENT |
| LOW | tests/fail/tree_borrows/spurious_read.rs | 1 | // We ensure a deterministic execution. | COMMENT |
| LOW | tests/fail/tree_borrows/spurious_read.rs | 41 | // spurious read x (target only, which we are *not* executing) | COMMENT |
| LOW | …tree_borrows/subtree_traversal_skipping_diagnostics.rs | 1 | //@compile-flags: -Zmiri-tree-borrows -Zmiri-provenance-gc=0 | COMMENT |
| LOW | …ee_borrows/wildcard/cross_tree_update_newer_exposed.rs | 21 | // ┌──────────────┐ | COMMENT |
| LOW | …rows/wildcard/subtree_internal_relatedness_wildcard.rs | 21 | // │ptr_base(Res)*│ * | COMMENT |
| LOW | …s/fail/tree_borrows/wildcard/single_exposed_disable.rs | 21 | // │ │ | COMMENT |
| LOW | …_borrows/wildcard/multi_exposed_child_unique_writer.rs | 21 | // │ ref1(Res)* │ | COMMENT |
| LOW | …ree_borrows/wildcard/multi_exposed_siblings_foreign.rs | 21 | // │ ptr_base ├──────────────┬───────────────────┐ | COMMENT |
| LOW | …ree_borrows/wildcard/multi_exposed_siblings_disable.rs | 21 | // │ ptr_base ├──────────────┬───────────────────┐ | COMMENT |
| LOW | …s/fail/tree_borrows/wildcard/single_exposed_foreign.rs | 21 | // │ │ | COMMENT |
| LOW | …/tree_borrows/wildcard/subtree_internal_relatedness.rs | 21 | // │ │ │ | COMMENT |
| LOW | tests/fail/tree_borrows/wildcard/protector_release.rs | 41 | // │ │ | COMMENT |
| LOW | tests/fail/tree_borrows/wildcard/protector_release.rs | 61 | // └───────────┘ | COMMENT |
| LOW | …ws/wildcard/cross_tree_update_main_invalid_exposed2.rs | 21 | COMMENT | |
| LOW | …ws/wildcard/cross_tree_update_main_invalid_exposed2.rs | 41 | // │ │ │ │ │ │ │ │ | COMMENT |
| LOW | …sts/fail/tree_borrows/wildcard/cross_tree_from_main.rs | 21 | // └──────┬─────┘ │ │ | COMMENT |
| LOW | …ows/wildcard/cross_tree_update_main_invalid_exposed.rs | 21 | COMMENT | |
| LOW | …/fail/tree_borrows/wildcard/cross_tree_update_newer.rs | 21 | // │ │ | COMMENT |
| LOW | tests/fail/tree_borrows/wildcard/protector_release2.rs | 1 | //@compile-flags: -Zmiri-tree-borrows -Zmiri-permissive-provenance | COMMENT |
| LOW | tests/fail/tree_borrows/wildcard/protector_release2.rs | 41 | // │ Cel │ Cel │ * | COMMENT |
| LOW | tests/fail/tree_borrows/wildcard/protector_release2.rs | 61 | // │ref5*| │ | COMMENT |
| LOW | …/tree_borrows/wildcard/multi_exposed_siblings_local.rs | 21 | // ┌─────────────┐ | COMMENT |
| LOW | …s/fail/tree_borrows/wildcard/cross_tree_update_main.rs | 21 | // └──────┬─────┘ │ │ | COMMENT |
| LOW | …rrows/wildcard/multi_exposed_siblings_unique_writer.rs | 21 | // │ ptr_base ├──────────────┐ | COMMENT |
| LOW | …/fail/tree_borrows/wildcard/cross_tree_update_older.rs | 21 | // │ │ | COMMENT |
| LOW | tests/fail/tree_borrows/wildcard/protected_wildcard.rs | 21 | // │ │ │ | COMMENT |
| LOW | …ws/wildcard/cross_tree_update_older_invalid_exposed.rs | 21 | let _int3 = ref3 as *mut u32 as usize; | COMMENT |
| LOW | …ws/wildcard/cross_tree_update_older_invalid_exposed.rs | 41 | // ┌────────────┐ ┌────────────┐ | COMMENT |
| LOW | tests/fail/tree_borrows/wildcard/multi_exposed_child.rs | 21 | let wild = int1 as *mut u32; | COMMENT |
| LOW | tests/fail/tree_borrows/wildcard/multi_exposed_child.rs | 41 | // │ ref3(Act)* │ | COMMENT |
| LOW | …s/wildcard/cross_tree_update_older_invalid_exposed2.rs | 21 | COMMENT | |
| LOW | …s/wildcard/cross_tree_update_older_invalid_exposed2.rs | 41 | // │ │ | COMMENT |
| LOW | tests/fail/match/closures/if-let-deref-in-pattern.rs | 1 | // This test serves to document the change in semantics introduced by | COMMENT |
| LOW | tests/fail/match/closures/partial-pattern.rs | 1 | // This test serves to document the change in semantics introduced by | COMMENT |
| LOW | tests/fail/match/closures/if-let-partial-pattern.rs | 1 | // This test serves to document the change in semantics introduced by | COMMENT |
| LOW | …fail/stacked_borrows/retag_data_race_protected_read.rs | 21 | COMMENT | |
| LOW | tests/fail/unaligned_pointers/dyn_alignment.rs | 1 | // should find the bug even without, but gets masked by optimizations | COMMENT |
| LOW | tests/fail/concurrency/mutex-leak-move-deadlock.rs | 1 | //@error-in-other-file: deadlock | COMMENT |
| LOW | tests/fail/data_race/read_write_race_stack.rs | 21 | // the operations need to occur in | COMMENT |
| LOW | tests/fail/data_race/write_write_race_stack.rs | 21 | // the operations need to occur in | COMMENT |
| LOW | tests/fail/both_borrows/drop_in_place_protector.rs | 1 | //@revisions: stack tree | COMMENT |
| LOW | …sts/fail/both_borrows/illegal_read_despite_exposed2.rs | 1 | //@revisions: stack tree | COMMENT |
| LOW | tests/pass/observed_local_mut.rs | 1 | // Stacked Borrows catches this (correctly) as UB. | COMMENT |
| LOW | tests/pass/float.rs | 21 | #[path = "../utils/mod.rs"] | COMMENT |
| LOW | tests/pass/float.rs | 461 | COMMENT | |
| LOW | tests/pass/float.rs | 1561 | check_nondet(|| a.exp()); | COMMENT |
| LOW | tests/pass/regions-lifetime-nonfree-late-bound.rs | 1 | // This is a regression test for the ICE from issue #10846. | COMMENT |
| LOW | tests/pass/too-large-primval-write-problem.rs | 1 | // `PrimVal`s in Miri are represented with 8 bytes (u64) and at the time of writing, the `-x` | COMMENT |
| LOW | tests/pass/enums.rs | 141 | /// The scaled mantissa. | COMMENT |
| LOW | tests/pass/strings.rs | 21 | } | COMMENT |
| LOW | tests/pass/move-data-across-await-point.rs | 1 | use std::future::Future; | COMMENT |
| LOW | tests/pass/slices.rs | 201 | // These regression tests (indirectly) call every slice method which contains a `buffer.as_mut_ptr()`. | COMMENT |
| 261 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/pass/protector-gc.rs | 1 | // When we pop a stack frame with weak protectors, we need to check if the protected pointer's | COMMENT |
| LOW | src/helpers.rs | 758 | // Step 1: determine the length. | COMMENT |
| LOW | src/helpers.rs | 772 | // Step 2: get the bytes. | COMMENT |
| LOW⚡ | src/borrow_tracker/stacked_borrows/mod.rs | 281 | // Step 1: Find granting item. | COMMENT |
| LOW⚡ | src/borrow_tracker/stacked_borrows/mod.rs | 285 | // Step 2: Remove incompatible items above them. Make sure we do not remove protected | COMMENT |
| LOW⚡ | src/borrow_tracker/stacked_borrows/mod.rs | 366 | // Step 1: Make a write access. | COMMENT |
| LOW⚡ | src/borrow_tracker/stacked_borrows/mod.rs | 370 | // Step 2: Pretend we remove the remaining items, checking if any are strongly protected. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | rustfmt.toml | 13 | # This file is copy-pasted from the tracing_chrome crate and should remain like the original. | COMMENT |
| MEDIUM | ci/vm-prepare.sh | 5 | # This file is inspired from <https://github.com/rust-lang/libc>. | COMMENT |
| MEDIUM | .github/workflows/ci.yml | 258 | # Create a token for the next step so it can create a PR that actually runs CI. | COMMENT |
| MEDIUM | .github/workflows/ci.yml | 292 | # Create a PR | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/helpers.rs | 758 | // Step 1: determine the length. | COMMENT |
| LOW | src/helpers.rs | 772 | // Step 2: get the bytes. | COMMENT |
| LOW⚡ | src/borrow_tracker/stacked_borrows/mod.rs | 281 | // Step 1: Find granting item. | COMMENT |
| LOW⚡ | src/borrow_tracker/stacked_borrows/mod.rs | 285 | // Step 2: Remove incompatible items above them. Make sure we do not remove protected | COMMENT |
| LOW⚡ | src/borrow_tracker/stacked_borrows/mod.rs | 366 | // Step 1: Make a write access. | COMMENT |
| LOW⚡ | src/borrow_tracker/stacked_borrows/mod.rs | 370 | // Step 2: Pretend we remove the remaining items, checking if any are strongly protected. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| CRITICAL | src/shims/unix/env.rs | 371 | let arch = this.machine.tcx.sess.target.arch.desc_symbol(); | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests/pass/float.rs | 35 | /// Essentially ULP can be seen as a distance metric of floating-point numbers, but with | COMMENT |
| MEDIUM | src/machine.rs | 1182 | // Definitely not enough. | COMMENT |
| MEDIUM | src/borrow_tracker/tree_borrows/tree.rs | 368 | // not yet accessed nodes exist. Essentially, we pretend there | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | src/borrow_tracker/tree_borrows/tree_visitor.rs | 137 | // Reverse the stack, as discussed above. | COMMENT |
| LOW | src/concurrency/sync.rs | 264 | // Don't forget to write the return value. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | .github/workflows/ci.yml | 232 | # Check if all jobs that we depend on (in the needs array) were successful. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | test-cargo-miri/run-test.py | 200 | def test_cargo_miri_multi_target(): | CODE |