Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ rust-version = "1.88"
version = "0.1.0"

[workspace.lints.rust]
unsafe_code = "forbid"
unsafe_code = "warn"
missing_docs = "warn"

# Every Clippy warning fails CI: `just rust lint` runs Clippy with `-D warnings`.
Expand Down
5 changes: 3 additions & 2 deletions docs/dev/rust-conventions.md
Original file line number Diff line number Diff line change
Expand Up @@ -370,8 +370,9 @@ Never `#[allow]`: an exception is `#[expect(lint, reason = "...")]` on the small
item it applies to, so it fails once the code no longer needs it, and the reason
says why the lint is wrong there, such as `reason = "One arm per operation, so a
new one cannot skip the decision."`. Clippy enforces both (`allow_attributes`,
`allow_attributes_without_reason`). The workspace forbids `unsafe`; were a crate
ever to need it, every block would carry a `// SAFETY:` comment
`allow_attributes_without_reason`). The workspace warns on `unsafe` (`unsafe_code`),
which fails the lint job; a block that must stay is an `#[expect(unsafe_code, reason
= "...")]` on the smallest item, with a `// SAFETY:` comment on every block
(`undocumented_unsafe_blocks`).

## Documentation and tests
Expand Down
Loading