Rust-lang/rust is adopting an LLM policy
TL;DR Highlight
Rust allows LLMs for questions and review but strictly restricts generated code, requiring disclosure.
Who Should Read
Developers who submit LLM-assisted PRs or issues to open-source projects, or who must review them.
Core Mechanics
- The policy covers rust-lang/rust only
- Five teams adopted it, and it is not an official Rust stance on LLMs.
- It affects reviewers and moderators, authors of LLM-generated PRs, people who find issues with LLMs, and people who quote LLM output.
- The rule: help, don't create
- LLMs are fine for answering questions, analyzing, distilling, refining, checking, suggesting and reviewing.
- Creating uses are heavily restricted, and LLM output in public docs, PR descriptions and comments must be clearly marked.
- LLM code PRs face a higher bar
- Only pre-arranged, non-critical, high-quality, well-tested and well-reviewed LLM code is allowed, with disclosure.
- LLM PRs must have tests, and soundness-critical changes are barred unless the author is a domain expert.
- Three problems motivated the policy
- Polished PRs no longer prove effort or understanding.
- Easier code writing worsens the existing review bandwidth shortage.
- Copy-pasting review comments into an LLM and posting its reply wastes time and breaks trust.
- Reviewers can close and are protected
- Reviewers may close non-compliant PRs with no questions asked and point authors to #llm-mentoring.
- Authors are responsible for stating LLM use, and reviewers must not accuse people based on style.
- Harassing people for using LLMs is prohibited.
- Disclosure is required in several cases
- Machine translation, trivial changes, bug discovery and LLM review of others' work must be disclosed.
- LLM output only you see needs no disclosure.
- Native-language messages are welcome and English translation is not required.
Community Reactions
- Opinion that new contributors don't know reviewers
- A commenter said new contributors must talk to a reviewer before an LLM PR, but they know none.
- They asked what the proper procedure is.
- Praise for anti-harassment and no-policing rules
- Some liked the ban on harassing LLM users.
- One said they had received severe insults on forums.
- Another especially liked the rule not to police whether someone used an LLM.
- Concern that disclosure invites witch hunts
- A commenter feared disclosure rules lead to suspicion based on appearance.
- They argued it could make communities gatekeep newcomers.
- Doubts about enforceability
- One commenter said people can hide AI use by removing em-dashes.
- Another noted Rust already has AI code in its codebase.
- Argument to address bottlenecks, not ban
- One commenter argued bans are self-defeating since developers will stop hand-writing code.
- They said the bottleneck moved to review and will be solved like CI/CD.
How to Apply
- Add an LLM-use field to your PR template
- Today, add a checkbox asking whether LLMs generated, analyzed or translated any part, and which.
- Put the burden on authors so reviewers needn't guess.
- Write a create-vs-assist rule
- In CONTRIBUTING, allow questions, analysis, summaries and review, and require pre-agreement and tests for generated code.
- Require marking LLM output in public comments.
- Add LLM PR criteria to the review checklist
- Check tests, prior agreement and whether it touches critical areas first.
- If any fails, close it citing the policy clause.
- Require human-written review replies
- State in team rules that review replies must not be pasted LLM output.
- If LLM text is used, it must be quoted and marked.
Try It
# Paste into Claude or ChatGPT (simplified version adapting the Rust LLM policy ideas into a CONTRIBUTING draft)
You are an open-source maintainer. Using the principles below, draft an 'LLM usage policy' section for our repo's CONTRIBUTING file.
- LLMs are fine for questions, analysis, summaries, refining, checking, suggestions and review. Creating new content is heavily restricted.
- LLM output in public docs, PR descriptions and comments must be clearly marked.
- LLM code PRs require prior agreement, tests, and no critical areas.
- Reviewers may close non-compliant PRs, and authors must disclose LLM use.
- Suspecting LLM use from style alone and harassing LLM users are prohibited.
Our repo info: {{repo description}}
Areas we designate as critical: {{critical areas}}
Next step: ask for matching PR template checkbox wording too.Terminology
Related Papers
Why Do LLMs Help with Scientific Misconduct Requests and What to Do About It?: Increasing the Trustworthiness of AI for Science
Adding an intention-analysis system prompt raised refusal of misconduct requests from 58% to 87%.
How Specification Explicitness Shapes Failure in LLM-Generated Code
Spelling out invariants, edge cases and constraints cut hidden-test failures in LLM code by 47.2%.
Same Task, Different Statement: When and How Reformulation Helps LLM Problem Solving
Rewriting problem statements to fit their type raises LLM accuracy, but blind rewriting hurts.
Show HN: STE80 Humanizer – de-AI text by writing 80% of the way to ASD-STE100
A skill strips 26 AI tells and rewrites text in short ASD-STE100-style sentences
Character-Name Concentration in LLM Fiction: Measuring Displacement and Mitigating Repetition
Drafting name candidates and filtering by frequency cut LLM character-name repetition by 95%
LLM Voice
Martin Fowler: LLM-drafted prose keeps an uncanny tone even after human editing.
The Instruction Tax on Factual Recall: Base Models Can Beat Their Instruction-Tuned Counterparts
Few-shot completion with repeated sampling on a base model beat chat: F1 0.684 vs 0.568
AI is a tool and using it well takes skill
A rebuttal to Hickey: LLMs are tools, and skill in directing and checking them decides the outcome