Add some pedantic lints for fun #90

Closed
opened 2026-06-12 03:11:13 +00:00 by Quaternions · 0 comments

Forbidding unsafe code is the most important part, the rest are just kinda code smell warnings

Add this to the workspace Cargo.toml:

[workspace.lints.rust]
unsafe_code = "forbid"
single_use_lifetimes = "warn"
trivial_casts = "warn"
unused_lifetimes = "warn"
unused_qualifications = "warn"
variant_size_differences = "warn"
unexpected_cfgs = "warn"

add this to each crate Cargo.toml:

[lints]
workspace = true
Forbidding unsafe code is the most important part, the rest are just kinda code smell warnings Add this to the workspace Cargo.toml: ```toml [workspace.lints.rust] unsafe_code = "forbid" single_use_lifetimes = "warn" trivial_casts = "warn" unused_lifetimes = "warn" unused_qualifications = "warn" variant_size_differences = "warn" unexpected_cfgs = "warn" ``` add this to each crate Cargo.toml: ``` [lints] workspace = true ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: funman300/Ferrous-Solitaire#90