Rust Bans LLM-Written Code in Its Compiler Monorepo
Five Rust teams adopted an LLM policy on 5 August covering the rust-lang/rust monorepo: models may analyse, review, and find bugs, but may not author code, docs, diagnostics, or PR comments without disclosure. Soundness-critical changes are off limits unless the author is a domain expert. The stated reason is review economics — polish no longer signals effort, and pasted model output burns reviewer time.
Five teams inside the Rust project adopted a formal LLM policy on 5 August, and the headline restriction is blunt: models may review code, analyse it, and help find bugs in it, but they may not author it. The policy, written by Jynn Nelson and published on the Inside Rust blog, governs contributions to the rust-lang/rust monorepo. It is explicitly not the Rust project's official position on AI, and it does not apply project-wide.
The rules sort into three tiers. Banned outright: LLM-authored code; documentation, compiler diagnostics, PR descriptions, or GitHub comments generated by a model without clear marking; mechanically pasting a model's response to a reviewer's feedback; soundness-critical changes produced by a model unless the author is an established domain expert; and any workflow that treats an LLM review as sufficient grounds to merge or reject. Allowed with disclosure: machine translation, trivial code or prose changes, bug discovery the contributor has verified, LLM-assisted review of others' work, and code changes that are pre-arranged, non-critical, high-quality, well-tested, and well-reviewed. Allowed with no disclosure at all: asking a model questions, using it to analyse, distil, refine, check, or suggest, and generating anything only the author ever sees.
The rationale is about review economics rather than code quality in the abstract. The policy names three community complaints: polished-looking work no longer signals that genuine effort went into it, models make an existing reviewer-bandwidth shortage worse, and copy-pasted model output wastes reviewer time in a loop that never converges. Nelson's framing is that reviewing is made of decisions, not just bug-catching — a model can flag a defect but cannot give an author the mental model needed to understand their own patch or plan the next one. The post cites Asimov's short story "Profession" on the difference between having knowledge and being able to think with it.
Enforcement is deliberately low-ceremony. Reviewers may close a non-compliant pull request without a written justification and point the author at mentoring channels instead. Disclosure is the author's responsibility, backed by PR templates that ask directly whether a model was used. Notably, writing style alone is not treated as evidence of LLM authorship — ambiguous cases go to private moderation reports rather than public accusations. The policy includes provisions for its own revision, and Rust's leadership is weighing a dedicated sub-team for LLM governance to streamline approvals and gather data on how contributors are actually using these tools.
Rust is not doing this alone. A growing catalogue of open-source projects has published AI-contribution policies over the past year, and the shape is converging: disclosure requirements, a carve-out for review and analysis, and a hard line on unreviewed generated code. What makes the Rust version worth reading closely is the soundness carve-out — a compiler is a place where a plausible-looking wrong patch is more expensive than no patch, and the policy prices that in explicitly rather than treating all contributions as equally reviewable.
Want AI news before everyone else?
The morning's most important AI stories, straight to your inbox. No fluff.