Beginner, advanced, expert level Rust training material
This report summarizes scanner evidence for microsoft/RustTraining, a Rust project with 14,986 GitHub stars. SynthScan examined 77,669 lines of code across 197 source files, recording 122 pattern matches distributed across 8 syntactic categories. The legacy adjusted pattern signal is 2.8 (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? 109 finding(s).
Are imports declared and package/API names verified? 6 finding(s).
Are wrappers, guards, and repeated structures necessary? 10 finding(s).
Which changes need focused human review? 122 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 122 distinct pattern matches across 8 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 | csharp-book/src/ch17-capstone-project.md | 48 | ### Step 1: Project Setup | COMMENT |
| LOW | csharp-book/src/ch17-capstone-project.md | 78 | ### Step 2: Define Your Data Types | COMMENT |
| LOW | csharp-book/src/ch17-capstone-project.md | 147 | ### Step 3: Error Type | COMMENT |
| LOW | csharp-book/src/ch17-capstone-project.md | 168 | ### Step 4: HTTP Client | COMMENT |
| LOW | csharp-book/src/ch17-capstone-project.md | 219 | ### Step 5: Display Formatting | COMMENT |
| LOW | csharp-book/src/ch17-capstone-project.md | 247 | ### Step 6: Wire It All Together | COMMENT |
| LOW | csharp-book/src/ch17-capstone-project.md | 298 | ### Step 7: Tests | COMMENT |
| LOW | rust-patterns-book/src/ch19-capstone-project.md | 39 | ## Step 1: Define the Task Types | COMMENT |
| LOW | rust-patterns-book/src/ch19-capstone-project.md | 90 | ## Step 2: Define the Work Function | COMMENT |
| LOW | rust-patterns-book/src/ch19-capstone-project.md | 105 | ## Step 3: Error Handling | COMMENT |
| LOW | rust-patterns-book/src/ch19-capstone-project.md | 128 | ## Step 4: The Scheduler | COMMENT |
| LOW | rust-patterns-book/src/ch19-capstone-project.md | 184 | ## Step 5: Integration Test | COMMENT |
| LOW | rust-patterns-book/src/ch19-capstone-project.md | 235 | ## Step 6: Put It All Together | COMMENT |
| LOW⚡ | …k/src/ch05-miri-valgrind-and-sanitizers-verifying-u.md | 112 | # Step 1: Run all tests under Miri | COMMENT |
| LOW⚡ | …k/src/ch05-miri-valgrind-and-sanitizers-verifying-u.md | 115 | # Step 2: If Miri reports errors, isolate them | COMMENT |
| LOW⚡ | …k/src/ch05-miri-valgrind-and-sanitizers-verifying-u.md | 118 | # Step 3: Use Miri's backtrace for diagnosis | COMMENT |
| LOW⚡ | …k/src/ch05-miri-valgrind-and-sanitizers-verifying-u.md | 121 | # Step 4: Choose a borrow model | COMMENT |
| LOW⚡ | engineering-book/src/ch12-tricks-from-the-trenches.md | 199 | # Step 1: Find duplicates | COMMENT |
| LOW⚡ | engineering-book/src/ch12-tricks-from-the-trenches.md | 202 | # Step 2: Find who pulls the old version | COMMENT |
| LOW⚡ | engineering-book/src/ch12-tricks-from-the-trenches.md | 205 | # Step 3: Update the culprit | COMMENT |
| LOW⚡ | engineering-book/src/ch12-tricks-from-the-trenches.md | 208 | # Step 4: If no update available, pin in [patch] | COMMENT |
| LOW⚡ | engineering-book/src/ch12-tricks-from-the-trenches.md | 212 | # Step 5: Verify | COMMENT |
| LOW⚡ | …-book/src/ch04-code-coverage-seeing-what-tests-miss.md | 129 | # Step 1: Build with coverage instrumentation | COMMENT |
| LOW⚡ | …-book/src/ch04-code-coverage-seeing-what-tests-miss.md | 134 | # Step 2: Run tests (generates .profraw files) | COMMENT |
| LOW⚡ | …-book/src/ch04-code-coverage-seeing-what-tests-miss.md | 137 | # Step 3: Aggregate with grcov | COMMENT |
| LOW | …-book/src/ch04-code-coverage-seeing-what-tests-miss.md | 148 | # Step 4: View report | COMMENT |
| LOW⚡ | …g-book/src/ch03-benchmarking-measuring-what-matters.md | 258 | # Step 1: Build with debug info (release speed, debug symbols) | COMMENT |
| LOW⚡ | …g-book/src/ch03-benchmarking-measuring-what-matters.md | 264 | # Step 2: Record with perf | COMMENT |
| LOW⚡ | …g-book/src/ch03-benchmarking-measuring-what-matters.md | 267 | # Step 3: Generate a flamegraph | COMMENT |
| LOW⚡ | …g-book/src/ch03-benchmarking-measuring-what-matters.md | 292 | # Step 1: Build with instrumentation | COMMENT |
| LOW⚡ | …g-book/src/ch03-benchmarking-measuring-what-matters.md | 295 | # Step 2: Run representative workloads | COMMENT |
| LOW⚡ | …g-book/src/ch03-benchmarking-measuring-what-matters.md | 298 | # Step 3: Merge profiling data | COMMENT |
| LOW⚡ | …g-book/src/ch03-benchmarking-measuring-what-matters.md | 304 | # Step 4: Rebuild with profiling feedback | COMMENT |
| LOW⚡ | …g-book/src/ch03-benchmarking-measuring-what-matters.md | 316 | # Step 1: Build with instrumentation | COMMENT |
| LOW⚡ | …g-book/src/ch03-benchmarking-measuring-what-matters.md | 319 | # Step 2: Run representative workloads | COMMENT |
| LOW⚡ | …g-book/src/ch03-benchmarking-measuring-what-matters.md | 322 | # Step 3: Rebuild with profiling feedback | COMMENT |
| LOW⚡ | …k/src/ch02-cross-compilation-one-source-many-target.md | 153 | # Step 1: Install target + cross-linker | COMMENT |
| LOW⚡ | …k/src/ch02-cross-compilation-one-source-many-target.md | 157 | # Step 2: Configure linker in .cargo/config.toml (see above) | COMMENT |
| LOW⚡ | …k/src/ch02-cross-compilation-one-source-many-target.md | 159 | # Step 3: Build | COMMENT |
| LOW⚡ | …k/src/ch02-cross-compilation-one-source-many-target.md | 162 | # Step 4: Verify the binary | COMMENT |
| LOW | python-book/src/ch15-migration-patterns.md | 271 | ### Step 1: Identify Hotspots | COMMENT |
| LOW | python-book/src/ch15-migration-patterns.md | 283 | ### Step 2: Write Rust Extension for Hotspot | COMMENT |
| LOW | python-book/src/ch15-migration-patterns.md | 295 | ### Step 3: Replace Python Call with Rust Call | COMMENT |
| LOW | python-book/src/ch15-migration-patterns.md | 308 | ### Step 4: Expand Gradually | COMMENT |
| LOW | python-book/src/ch17-capstone-project.md | 70 | ## Step 1: Define the Data Model (Ch. 3, 6, 10, 11) | COMMENT |
| LOW | python-book/src/ch17-capstone-project.md | 152 | ## Step 2: Storage Layer (Ch. 9, 7) | COMMENT |
| LOW | python-book/src/ch17-capstone-project.md | 190 | ## Step 3: Command Enum (Ch. 6) | COMMENT |
| LOW | python-book/src/ch17-capstone-project.md | 251 | ## Step 4: Business Logic (Ch. 5, 12, 7) | COMMENT |
| LOW | python-book/src/ch17-capstone-project.md | 335 | ## Step 5: Wire It Together (Ch. 8) | COMMENT |
| LOW | python-book/src/ch17-capstone-project.md | 401 | ## Step 6: Cargo.toml Dependencies | COMMENT |
| LOW | python-book/src/ch17-capstone-project.md | 420 | ## Step 7: Tests (Ch. 14) | COMMENT |
| LOW | xtask/src/main.rs | 323 | /// NOTE: This function preserves and hardens the multi-layer security from PR#18: | COMMENT |
| LOW⚡ | …c/ch14-async-is-an-optimization-not-an-architecture.md | 52 | // Step 1: Validate — pure business rules, no I/O | COMMENT |
| LOW⚡ | …c/ch14-async-is-an-optimization-not-an-architecture.md | 56 | // Step 2: Check inventory — needs a database call | COMMENT |
| LOW⚡ | …c/ch14-async-is-an-optimization-not-an-architecture.md | 62 | // Step 3: Calculate pricing — pure math, but async because we're already here | COMMENT |
| LOW⚡ | …c/ch14-async-is-an-optimization-not-an-architecture.md | 65 | // Step 4: Apply discount — needs an external service call | COMMENT |
| LOW⚡ | …c/ch14-async-is-an-optimization-not-an-architecture.md | 69 | // Step 5: Format receipt — pure | COMMENT |
| LOW⚡ | async-book/src/ch15-exercises.md | 298 | // Step 2: Filter evens | COMMENT |
| LOW⚡ | async-book/src/ch15-exercises.md | 300 | // Step 3: Square each | COMMENT |
| LOW⚡ | async-book/src/ch15-exercises.md | 302 | // Step 4: Process concurrently (simulate async work) | COMMENT |
| 14 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | csharp-book/RustBootstrapForCSharp.md | 801 | } | COMMENT |
| LOW | csharp-book/src/ch03-built-in-types-and-variables.md | 461 | /* Multi-line | COMMENT |
| LOW | csharp-book/src/ch16-3-rust-tooling-ecosystem.md | 61 | COMMENT | |
| LOW | …p-book/src/ch15-1-essential-crates-for-c-developers.md | 321 | } | COMMENT |
| LOW | …rns-book/src/ch14-testing-and-benchmarking-patterns.md | 61 | COMMENT | |
| LOW | …book/src/ch06-concurrency-vs-parallelism-vs-threads.md | 401 | } | COMMENT |
| LOW | rust-patterns-book/src/ch02-traits-in-depth.md | 381 | COMMENT | |
| LOW | …rns-book/src/ch15-crate-architecture-and-api-design.md | 481 | // #[arg(short, long)] | COMMENT |
| LOW | …rns-book/src/ch15-crate-architecture-and-api-design.md | 501 | # type Error = String; | COMMENT |
| LOW | …rns-book/src/ch15-crate-architecture-and-api-design.md | 801 | /// Parses a diagnostic fault code from a string. | COMMENT |
| LOW | …k/src/ch06-dependency-management-and-supply-chain-s.md | 21 | which tracks known vulnerabilities in published crates. | COMMENT |
| LOW | …k/src/ch06-dependency-management-and-supply-chain-s.md | 241 | # Shows all paths from your crate to openssl-sys | COMMENT |
| LOW | …k/src/ch05-miri-valgrind-and-sanitizers-verifying-u.md | 81 | mod tests { | COMMENT |
| LOW | …ring-book/src/ch08-compile-time-and-developer-tools.md | 161 | # x = unsafe code used by the build | COMMENT |
| LOW | …g-book/src/ch10-windows-and-conditional-compilation.md | 41 | // Operating system | COMMENT |
| LOW | python-book/src/ch08-crates-and-modules.md | 1 | ## Rust Modules vs Python Packages | COMMENT |
| LOW | python-book/src/ch08-crates-and-modules.md | 21 | # ├── user.py | COMMENT |
| LOW | python-book/src/ch12-closures-and-iterators.md | 381 | COMMENT | |
| LOW | python-book/src/ch14-unsafe-rust-and-ffi.md | 61 | ```rust | COMMENT |
| LOW | python-book/src/ch01-introduction-and-motivation.md | 301 | # COPY requirements.txt . | COMMENT |
| LOW | async-book/src/ch06-building-futures-by-hand.md | 61 | } else { | COMMENT |
| LOW | …k/src/ch06-dimensional-analysis-making-the-compiler.md | 181 | # #[derive(Debug, Clone, Copy, PartialEq, PartialOrd)] | COMMENT |
| LOW | …k/src/ch06-dimensional-analysis-making-the-compiler.md | 281 | - Comparing Celsius against Volts is a **compile error** | COMMENT |
| LOW | …k/src/ch15-const-fn-compile-time-correctness-proofs.md | 261 | COMMENT | |
| LOW | …k/src/ch08-capability-mixins-compile-time-hardware-.md | 81 | ``` | COMMENT |
| LOW | …k/src/ch08-capability-mixins-compile-time-hardware-.md | 181 | ```rust,ignore | COMMENT |
| LOW | type-driven-correctness-book/src/ch12-exercises.md | 761 | format!("{}: {}/{} passed", self.name, passed, total) | COMMENT |
| LOW | …orrectness-book/src/ch18-redfish-server-walkthrough.md | 301 | // .name("PowerEdge R750".into()) | COMMENT |
| LOW | c-cpp-book/src/ch13-concurrency.md | 381 | // Output (order may vary): | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | rust-patterns-book/src/ch02-traits-in-depth.md | 1086 | // ── Bus abstractions (traits the hardware team provides) ────────── | COMMENT |
| MEDIUM | rust-patterns-book/src/ch02-traits-in-depth.md | 1218 | // ── Concrete bus implementations (Linux platform) ──────────────── | COMMENT |
| MEDIUM | rust-patterns-book/src/ch02-traits-in-depth.md | 1250 | // ── Production platform — all four buses ───────────────────────── | COMMENT |
| MEDIUM | rust-patterns-book/src/ch02-traits-in-depth.md | 1312 | // ── Partial platform: only fan-related buses ───────────────── | COMMENT |
| MEDIUM | xtask/src/main.rs | 99 | // ── build ──────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | xtask/src/main.rs | 404 | // ── serve ──────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | xtask/src/main.rs | 485 | // ── clean ──────────────────────────────────────────────────────────── | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| CRITICAL | python-book/src/ch08-crates-and-modules.md | 25 | from myproject.utils.helpers import format_name | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | csharp-book/RustBootstrapForCSharp.md | 5205 | name: "John Doe".to_string(), | CODE |
| LOW | csharp-book/RustTrainingForCSharp.md | 1913 | "John Doe".to_string(), | CODE |
| LOW | …p-book/src/ch15-1-essential-crates-for-c-developers.md | 164 | "John Doe".to_string(), | CODE |
| LOW | …s-book/src/ch03-the-newtype-and-type-state-patterns.md | 56 | let email = Email::new("user@example.com").unwrap(); | CODE |
| LOW | …k/src/ch07-validated-boundaries-parse-dont-validate.md | 179 | Some("Acme Corp".to_string()) // stub | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | python-book/src/ch15-migration-patterns.md | 417 | # Same Python orchestration, same tests, same deployment | COMMENT |
| MEDIUM | c-cpp-book/src/ch08-crates-and-modules.md | 620 | | `#ifdef TEST` mock functions | Trait-based dependency injection | | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | csharp-book/RustBootstrapForCSharp.md | 116 | public class DataProcessor | CODE |
| LOW | csharp-book/RustBootstrapForCSharp.md | 4859 | public class DataProcessor | CODE |
| LOW | csharp-book/src/ch01-introduction-and-motivation.md | 25 | public class DataProcessor | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | c-cpp-book/src/ch08-crates-and-modules.md | 20 | // TODO: implement pub fn add(a: u32, b: u32) -> u32 | COMMENT |