Move self_named_module_files to [lints.clippy]
`.clippy.toml` rejected it as an unknown config key — it is a lint level, which belongs in `[lints.clippy]`.

Assisted-by: Claude Opus 4.8 via Claude Code
change zzoqzmmzpyyowuvstsmwtzmsmpqmzqlp
commit 835a04c54ff92183227476322fc78be0acd03f44
author Alpha Chen <alpha@kejadlen.dev>
date
parent kklonrkv
diff --git a/ai/skills/rust/scaffolding.md b/ai/skills/rust/scaffolding.md
index d2e5befe..6ab1364a 100644
--- a/ai/skills/rust/scaffolding.md
+++ b/ai/skills/rust/scaffolding.md
@@ -60,6 +60,7 @@ hegeltest = "*"
 tempfile = "*"
 
 [lints.clippy]
+self_named_module_files = "warn"
 unwrap_used = "warn"
 expect_used = "warn"
 panic = "warn"
@@ -77,11 +78,13 @@ Notes on this template:
   detail survives through tests and library consumers.
 - `hegeltest` — property-based testing built on the Hypothesis engine,
   with built-in shrinking.
-- `[lints.clippy]` panic-discipline lints — `unwrap`, `expect`, raw
-  `panic!`, slice indexing, and unchecked arithmetic are denial-of-service
-  bugs waiting for untrusted input. See `style.md` "Panic discipline" for
-  rationale and how to opt out at a single call site when an invariant is
-  genuinely local.
+- `[lints.clippy]` — `self_named_module_files` enforces `foo.rs` over
+  `foo/mod.rs` for module files. The rest are panic-discipline lints:
+  `unwrap`, `expect`, raw `panic!`, slice indexing, and unchecked
+  arithmetic are denial-of-service bugs waiting for untrusted input. All
+  are lint levels, so they live here rather than in `.clippy.toml`. See
+  `style.md` "Panic discipline" for rationale and how to opt out at a
+  single call site when an invariant is genuinely local.
 
 Cross-cutting choices (edition, lock file, fs-err, tracing, tokio
 features) are explained in `SKILL.md`.
diff --git a/ai/skills/rust/style.md b/ai/skills/rust/style.md
index 5b7e7b70..2e7a7d74 100644
--- a/ai/skills/rust/style.md
+++ b/ai/skills/rust/style.md
@@ -366,8 +366,6 @@ test module; gate tests with `#![cfg_attr(test, allow(...))]` instead.
 Collect these in `.clippy.toml` at the crate root:
 
 ```toml
-self-named-module-files = "warn"
-
 disallowed-methods = [
     { path = "std::iter::Iterator::for_each", reason = "prefer `for` for side-effects" },
     { path = "std::iter::Iterator::try_for_each", reason = "prefer `for` for side-effects" },
@@ -402,7 +400,12 @@ disallowed-types = [
 ]
 ```
 
-Panic-discipline lints (`unwrap_used`, `expect_used`, `panic`,
-`indexing_slicing`, `arithmetic_side_effects`) live in `Cargo.toml`
-under `[lints.clippy]`, not here — they're lints, not config keys, so
-`.clippy.toml` won't pick them up. The template is in `scaffolding.md`.
+Lint *levels* live in `Cargo.toml` under `[lints.clippy]`, not here —
+`.clippy.toml` configures lint behavior (thresholds, disallowed paths)
+and rejects anything that isn't a known config key. This trips up
+`self_named_module_files`: it's a lint with no configurable behavior, so
+setting `self-named-module-files = "warn"` in `.clippy.toml` errors with
+an unknown-field message. It belongs in `[lints.clippy]` alongside the
+panic-discipline lints (`unwrap_used`, `expect_used`, `panic`,
+`indexing_slicing`, `arithmetic_side_effects`). The template is in
+`scaffolding.md`.