Mutability

name: m03-mutability description: "CRITICAL: Use for mutability issues. Triggers: E0596, E0499, E0502, cannot borrow as mutable, already borrowed as immutable, mut, &mut, interior mutability, Cell
阅读全文

Rust Trait Explorer

name: rust-trait-explorer description: "Explore Rust trait implementations using LSP. Triggers on: /trait-impl, find implementations, who implements, trait 实现, 谁实现了, 实现了哪些trait" argument-hint:
阅读全文

Add SAFETY Comment Before Any Unsafe Block

id: safety-09 original_id: P.UNS.SAS.09 level: P impact: CRITICAL clippy: undocumented_unsafe_blocks Add SAFETY Comment Before Any Unsafe Block Summary Every unsafe block or unsafe impl must have a //
阅读全文

Avoid Union Except for C Interop

id: union-01 original_id: P.UNS.UNI.01 level: P impact: HIGH Avoid Union Except for C Interop Summary Only use union for FFI with C code. For Rust-only code, use enum with explicit tags. Rationale Uni
阅读全文

Do Not Share Raw Pointers Across Threads

id: ptr-01 original_id: P.UNS.PTR.01 level: P impact: CRITICAL Do Not Share Raw Pointers Across Threads Summary Raw pointers (*const T, *mut T) are not Send or Sync by default. Do not share them acros
阅读全文

Rule Template

Rule Template Use this template for all unsafe-checker rules. --- id: {prefix}-{number} original_id: P.UNS.XXX.YY or G.UNS.XXX.YY level: P|G impact: CRITICAL|HIGH|MEDIUM clippy: <clippy_lint_name&g
阅读全文