rust-style-clippy

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Rust Style Formatting and Static Analysis

Rust 风格、格式化与静态分析

Capability Boundaries

能力边界

✅ Strengths

✅ 优势

  1. Stable rustfmt configuration (edition, max_width, tab_spaces, use_field_init_shorthand, etc.)
  2. Clippy lint system — all 10 lint groups: correctness, suspicious, style, complexity, perf, pedantic, restriction, cargo, nursery, internal
  3. clippy.toml
    configuration (msrv, arithmetic-side, cognitive-complexity-threshold, avoid-breaking-exported-api, etc.)
  4. #[expect(...)]
    attribute (Rust 1.81+) for CI-enforced lint expectations
  5. Lint
    priority
    ordering for layered policy
  6. Production CI lint policy (deny/warn/allow decisions per group)
  7. Edition migration (2015→2018→2021→2024, key changes per edition and cargo fix commands)
  8. Compiler error code interpretation (rustc --explain, common error codes reference table)
  1. 稳定的 rustfmt 配置(edition、max_width、tab_spaces、use_field_init_shorthand 等)
  2. Clippy lint 系统——全部 10 个 lint 组:correctness、suspicious、style、complexity、perf、pedantic、restriction、cargo、nursery、internal
  3. clippy.toml
    配置(msrv、arithmetic-side、cognitive-complexity-threshold、avoid-breaking-exported-api 等)
  4. #[expect(...)]
    属性(Rust 1.81+),用于 CI 强制执行的 lint 预期
  5. Lint
    priority
    排序,用于分层策略
  6. 生产环境 CI lint 策略(按组决定 deny/warn/allow)
  7. Edition 迁移(2015→2018→2021→2024、各 Edition 的关键变化以及 cargo fix 命令)
  8. 编译器错误代码解读(rustc --explain、常见错误代码速查表)

⚠️ Prerequisites

⚠️ 前置条件

  1. Rust toolchain installed and configured
  1. 已安装并配置 Rust 工具链

❌ Out of Scope

❌ 不在范围内

  1. Rust syntax basics → Use
    rust-stable
    skill
  2. Code review → Use
    rust-code-review
    skill
  3. API shape design (naming, type/trait design, module layout) and the full ~100 C-* API Guidelines checklist → Use the
    rust-api-design
    skill. This skill only maps the ~25 C-* rules that Clippy can mechanically enforce; the rest are design decisions.
  1. Rust 语法基础 → 使用
    rust-stable
    skill
  2. 代码审查 → 使用
    rust-code-review
    skill
  3. API 形状设计(命名、类型/trait 设计、模块布局)以及完整的约 100 条 C-* API Guidelines 检查清单 → 使用
    rust-api-design
    skill。此 skill 仅映射 Clippy 能够机械检查的约 25 条 C-* 规则,其余规则属于设计决策。

When to Use

使用时机

  • "Format Rust code"
  • "Run Clippy"
  • "Migrate to a new Edition"
  • "What does compiler error E0xxx mean?"

  • “格式化 Rust 代码”
  • “运行 Clippy”
  • “迁移到新 Edition”
  • “编译器错误 E0xxx 表示什么?”

I. rustfmt Configuration

I. rustfmt 配置

toml
undefined
toml
undefined

.rustfmt.toml

.rustfmt.toml

max_width = 100 # Line width (default: 100) tab_spaces = 4 # Indentation spaces edition = "2024" # Rust edition merge_derives = true # Merge derives use_field_init_shorthand = true # Field initialization shorthand use_try_shorthand = true # Use ? shorthand

```bash
cargo fmt                           # Format all files
cargo fmt --check                   # Check formatting (CI usage)
cargo fmt -- --config max_width=80  # Apply specific configuration
Options such as
imports_granularity
,
group_imports
, and
reorder_impl_items
may still require nightly rustfmt; do not include them in default configurations that must pass stable CI.
max_width = 100 # Line width (default: 100) tab_spaces = 4 # Indentation spaces edition = "2024" # Rust edition merge_derives = true # Merge derives use_field_init_shorthand = true # Field initialization shorthand use_try_shorthand = true # Use ? shorthand

```bash
cargo fmt                           # Format all files
cargo fmt --check                   # Check formatting (CI usage)
cargo fmt -- --config max_width=80  # Apply specific configuration
imports_granularity
、
group_imports
和
reorder_impl_items
等选项可能仍需要 nightly rustfmt;不应将它们加入必须通过 stable CI 的默认配置。

II. Clippy

II. Clippy

bash
cargo clippy                              # Default: correctness, suspicious, style, complexity, perf
cargo clippy -- -W clippy::pedantic       # Enable pedantic group
cargo clippy --fix                        # Auto-fix MachineApplicable lints
cargo clippy -- -A clippy::module_inception  # Allow a specific lint
bash
cargo clippy                              # Default: correctness, suspicious, style, complexity, perf
cargo clippy -- -W clippy::pedantic       # Enable pedantic group
cargo clippy --fix                        # Auto-fix MachineApplicable lints
cargo clippy -- -A clippy::module_inception  # Allow a specific lint

All 10 lint groups

全部 10 个 lint 组

GroupDefault levelDescriptionHigh-leverage lints
correctness
deny (effectively)Code that is wrong — broken semantics
almost_swap
,
drop_non_drop
,
if_same_then_else
,
out_of_bounds_looping
,
ptr_offset_with_cast
suspicious
warnLikely-buggy code that compiles but smells off
mutable_key_type
,
assign_op_pattern
,
blqcklisted_name
,
cast_lossless
,
clone_on_ref_ptr
style
warn (default group)Idiomatic Rust stylistic preferences
enum_variant_names
,
new_without_default
,
wrong_self_convention
,
needless_return
,
module_inception
complexity
warnCode that could be simpler
too_many_arguments
,
cognitive-complexity
,
manual_flatten
,
option_option
perf
warnPerformance hints (allocations, copies)
large_enum_variant
,
single_char_pattern
,
manual_memcpy
,
vec_box
,
derivable_impls
pedantic
allow (opt-in)Opinionated style — stricter than style
cast_possible_truncation
,
fn_params_excessive_bools
,
must_use_candidate
,
missing_errors_doc
,
module_name_repetitions
restriction
allow (opt-in)Forbid patterns that may be intentional but risky
unwrap_used
,
expect_used
,
panic
,
indexing_slicing
,
dbg_macro
,
print_stdout
,
float_arithmetic
cargo
warn
Cargo.toml
quality
cargo_common_metadata
,
negative_feature_names
,
redundant_feature_names
,
wildcard_dependencies
nursery
allow (experimental)Lints under development
use_self
,
fallible_impl_from
,
missing_const_for_fn
internal
allowFor Clippy's own development(rarely used by users)
组默认级别说明高收益 lint
correctness
deny(实际上)错误的代码——语义已损坏
almost_swap
、
drop_non_drop
、
if_same_then_else
、
out_of_bounds_looping
、
ptr_offset_with_cast
suspicious
warn可以编译但可能存在问题的可疑代码
mutable_key_type
、
assign_op_pattern
、
blqcklisted_name
、
cast_lossless
、
clone_on_ref_ptr
style
warn(默认组)符合 Rust 惯用法的风格偏好
enum_variant_names
、
new_without_default
、
wrong_self_convention
、
needless_return
、
module_inception
complexity
warn可以简化的代码
too_many_arguments
、
cognitive-complexity
、
manual_flatten
、
option_option
perf
warn性能提示(内存分配、复制操作)
large_enum_variant
、
single_char_pattern
、
manual_memcpy
、
vec_box
、
derivable_impls
pedantic
allow(需主动启用)主观性较强的风格——比 style 更严格
cast_possible_truncation
、
fn_params_excessive_bools
、
must_use_candidate
、
missing_errors_doc
、
module_name_repetitions
restriction
allow(需主动启用)禁止可能有意使用但具有风险的模式
unwrap_used
、
expect_used
、
panic
、
indexing_slicing
、
dbg_macro
、
print_stdout
、
float_arithmetic
cargo
warn
Cargo.toml
质量
cargo_common_metadata
、
negative_feature_names
、
redundant_feature_names
、
wildcard_dependencies
nursery
allow(实验性)开发中的 lint
use_self
、
fallible_impl_from
、
missing_const_for_fn
internal
allow供 Clippy 自身开发使用用户很少使用

#[expect]
attribute (Rust 1.81+) — better than
#[allow]

#[expect]
属性(Rust 1.81+)——优于
#[allow]

rust
// ✅ #[expect] — CI fails if the lint stops firing, surfacing dead expectations
#[expect(clippy::too_many_arguments, reason = "configurable builder has many options")]
fn build(name: &str, retries: u32, timeout: u32, /* 5 more */) { /* */ }

// ❌ #[allow] — silently becomes dead code if the lint stops firing
#[allow(clippy::too_many_arguments)]
fn build(/* */) { /* */ }
Prefer
#[expect]
for intentional suppressions; reserve
#[allow]
for transient reasons.
rust
// ✅ #[expect] — CI fails if the lint stops firing, surfacing dead expectations
#[expect(clippy::too_many_arguments, reason = "configurable builder has many options")]
fn build(name: &str, retries: u32, timeout: u32, /* 5 more */) { /* */ }

// ❌ #[allow] — silently becomes dead code if the lint stops firing
#[allow(clippy::too_many_arguments)]
fn build(/* */) { /* */ }
对于有意进行的 lint 抑制,应优先使用
#[expect]
;仅在临时原因下使用
#[allow]
。

Lint
priority
— layering

Lint
priority
——分层配置

rust
// Higher priority wins. Use for layered policy.
#![warn(clippy::pedantic)]                       // enable pedantic (priority 0)
#![warn(priority = 1, clippy::module_name_repetitions)]  // re-enable a specific lint
rust
// Higher priority wins. Use for layered policy.
#![warn(clippy::pedantic)]                       # enable pedantic (priority 0)
#![warn(priority = 1, clippy::module_name_repetitions)]  # re-enable a specific lint

clippy.toml
configuration

clippy.toml
配置

toml
undefined
toml
undefined

clippy.toml at workspace root

clippy.toml at workspace root

msrv = "1.85" # Don't suggest APIs newer than MSRV avoid-breaking-exported-api = false # Suggest fixes that change public API cognitive-complexity-threshold = 25 # Function complexity limit arithmetic-side = "checked" # Prefer checked_* arithmetic enum-variant-name-threshold = 1 # Trigger variant_name lint single-char-binding-names-threshold = 3 # Allow
_a
,
_b
, but not 4+ too-many-arguments-threshold = 7 type-complexity-threshold = 250 disallowed-methods = [ { path = "std::env::var", reason = "use our config::get instead" }, ] disallowed-types = [ { path = "std::collections::LinkedList", reason = "almost never the right choice" }, ] disallowed-macros = [ { path = "std::println", reason = "use tracing in libraries" }, ]

See `references/clippy-lint-policy.md` for the full `clippy.toml` reference and production policies.
msrv = "1.85" # Don't suggest APIs newer than MSRV avoid-breaking-exported-api = false # Suggest fixes that change public API cognitive-complexity-threshold = 25 # Function complexity limit arithmetic-side = "checked" # Prefer checked_* arithmetic enum-variant-name-threshold = 1 # Trigger variant_name lint single-char-binding-names-threshold = 3 # Allow
_a
,
_b
, but not 4+ too-many-arguments-threshold = 7 type-complexity-threshold = 250 disallowed-methods = [ { path = "std::env::var", reason = "use our config::get instead" }, ] disallowed-types = [ { path = "std::collections::LinkedList", reason = "almost never the right choice" }, ] disallowed-macros = [ { path = "std::println", reason = "use tracing in libraries" }, ]

有关完整的 `clippy.toml` 参考和生产环境策略,请参阅 `references/clippy-lint-policy.md`。

Production CI lint policy

生产环境 CI lint 策略

Different projects need different strictness. See
references/clippy-lint-policy.md
for ready-to-paste configurations.
Project typePedanticRestrictionRecommended
Library (published)warnallow
clippy::all
+
clippy::pedantic
warn +
cargo::cargo_common_metadata
deny
Application / binarywarnwarn (
unwrap_used
)
Add
restriction::unwrap_used
,
panic
,
indexing_slicing
Embedded / safety-criticalwarndenyAll restriction lints deny; add
float_arithmetic
deny
Internal toolallowallowJust
clippy::all
(default groups)
不同项目需要采用不同的严格程度。有关可直接粘贴的配置,请参阅
references/clippy-lint-policy.md
。
项目类型PedanticRestriction推荐配置
库(已发布)warnallow
clippy::all
+
clippy::pedantic
warn +
cargo::cargo_common_metadata
deny
应用/二进制warnwarn(
unwrap_used
)
添加
restriction::unwrap_used
、
panic
、
indexing_slicing
嵌入式/安全关键warndeny将所有 restriction lint 设为 deny;添加
float_arithmetic
deny
内部工具allowallow仅使用
clippy::all
(默认组)

III. Edition Migration

III. Edition 迁移

bash
undefined
bash
undefined

Check current edition

Check current edition

cargo metadata --format-version 1 | jq '.packages[0].edition'
cargo metadata --format-version 1 | jq '.packages[0].edition'

Migration steps (example: 2021 → 2024)

Migration steps (example: 2021 → 2024)

cargo fix --edition # Auto-migrate code cargo build # Verify compilation cargo test # Validate functionality
cargo fix --edition # Auto-migrate code cargo build # Verify compilation cargo test # Validate functionality

Update Cargo.toml

Update Cargo.toml

edition = "2024"

edition = "2024"


Key changes per edition:

| Edition | Key Changes |
|---------|-------------|
| 2015→2018 | Path and module import changes, `dyn Trait`, NLL, anonymous lifetimes and keywords changed |
| 2018→2021 | Precise closure capture, array `IntoIterator`, panic macro consistency, prelude and reserved syntax changes |
| 2021→2024 | RPIT lifetime capture, match ergonomics adjustment, temporary value scope, `unsafe extern`/unsafe attributes, `gen` keyword, etc. |

各 Edition 的关键变化:

| Edition | 关键变化 |
|---------|-------------|
| 2015→2018 | 路径和模块导入变化、`dyn Trait`、NLL、匿名生命周期以及关键字变更 |
| 2018→2021 | 精确闭包捕获、数组 `IntoIterator`、panic 宏一致性、prelude 和保留语法变更 |
| 2021→2024 | RPIT 生命周期捕获、match ergonomics 调整、临时值作用域、`unsafe extern`/unsafe 属性、`gen` 关键字等 |

IV. Compiler Error Code Quick Reference

IV. 编译器错误代码速查

bash
undefined
bash
undefined

View error details

View error details

rustc --explain E0277

| Error Code | Meaning | Typical Scenario |
|------------|---------|------------------|
| E0277 | Trait not implemented | `T: Trait` bound is unsatisfied |
| E0308 | Type mismatch | Expected type A, but B provided |
| E0502 | Borrow conflict | Cannot have mutable borrow and immutable borrow simultaneously |
| E0597 | Insufficient lifetimes | Reference goes out of scope beyond its lifetime value |
| E0432 | Import not found | `use` path is incorrect |
| E0061 | Parameter count mismatch | Function call has wrong number of parameters |
| E0106 | Missing lifetimes | Function signature requires explicit lifetimes |
| E0382 | Use moved value | Ownership already transferred |
| E0499 | Simultaneous mutable borrow | Only one `&mut` allowed per expression |
| E0716 | Insufficient lifetime for temporary values | Reference on temporary exceeds its scope |
rustc --explain E0277

| 错误代码 | 含义 | 典型场景 |
|------------|---------|------------------|
| E0277 | 未实现 Trait | `T: Trait` 约束未满足 |
| E0308 | 类型不匹配 | 期望类型 A,但提供了 B |
| E0502 | 借用冲突 | 无法同时拥有可变借用和不可变借用 |
| E0597 | 生命周期不足 | 引用超出其生命周期值所允许的作用范围 |
| E0432 | 找不到导入 | `use` 路径不正确 |
| E0061 | 参数数量不匹配 | 函数调用传入了错误数量的参数 |
| E0106 | 缺少生命周期 | 函数签名要求显式指定生命周期 |
| E0382 | 使用已移动的值 | 所有权已经转移 |
| E0499 | 同时进行可变借用 | 单个表达式中只能有一个 `&mut` |
| E0716 | 临时值生命周期不足 | 对临时值的引用超出了其作用域 |

V. API Guidelines ↔ Clippy Lints

V. API Guidelines ↔ Clippy Lints

The Rust API Guidelines checklist uses
C-*
rules (about 100 total). Clippy mechanically enforces roughly 25 of them; the remaining ~75 are design judgments (naming, type/trait shape, module layout) that belong to the
rust-api-design
skill, or require
cargo-semver-checks
for breaking-change detection. The table below lists the 12 highest-leverage mappings reviewers ask about most. The full crosswalk, including "lints not yet covered" guidance, lives in
references/api-guidelines-to-clippy.md
.
C-* RuleClippy LintGroupEffect
C-UNWRAP
clippy::unwrap_used
restrictionFlags
unwrap()
calls
C-UNWRAP
clippy::expect_used
restrictionFlags
expect()
calls
C-PANIC
clippy::panic
restrictionFlags
panic!()
C-INDEXING
clippy::indexing_slicing
restrictionFlags
[i]
indexing (panics)
C-BOOL-ARG
clippy::fn_params_excessive_bools
pedanticFunctions with ≥3 bool params
C-NEWTYPE
clippy::new_without_default
style
new()
exists but no
Default
C-NEWTYPE
clippy::new_ret_no_self
style
new()
returns non-
Self
C-CONV / C-WRONG-SELF
clippy::wrong_self_convention
style
as_X(self)
taking
&self
, or
to_X(&self)
consuming self
C-STRING-PATTERNS
clippy::single_char_pattern
perf
.contains("a")
→
.contains('a')
C-COMMON-TRAITS
clippy::derivable_impls
perfManual impl that could be derived
C-LARGE-NUMERIC
clippy::unreadable_literal
style
1000000
should be
1_000_000
C-MUTABLE-KEY
clippy::mutable_key_type
suspicious
HashMap
key type is mutable
C-CLONE-ON-REF
clippy::clone_on_ref_ptr
restriction
.clone()
on
Rc
/
Arc
Many
restriction
and
pedantic
lints are off by default — enable them explicitly via
#![warn(clippy::unwrap_used)]
or in
clippy.toml
when enforcing a guideline in CI.
Rust API Guidelines 检查清单使用
C-*
规则(共约 100 条)。Clippy 能够机械检查其中约 25 条;其余约 75 条属于设计判断(命名、类型/trait 形状、模块布局),应交由
rust-api-design
skill 处理,或使用
cargo-semver-checks
检测破坏性变更。下表列出了审查者最常询问的 12 个高收益映射。完整对照表,包括“尚未覆盖的 lint”相关指导,位于
references/api-guidelines-to-clippy.md
。
C-* 规则Clippy Lint组效果
C-UNWRAP
clippy::unwrap_used
restriction标记
unwrap()
调用
C-UNWRAP
clippy::expect_used
restriction标记
expect()
调用
C-PANIC
clippy::panic
restriction标记
panic!()
C-INDEXING
clippy::indexing_slicing
restriction标记
[i]
索引(可能触发 panic)
C-BOOL-ARG
clippy::fn_params_excessive_bools
pedantic函数包含 ≥3 个 bool 参数
C-NEWTYPE
clippy::new_without_default
style存在
new()
,但没有
Default
C-NEWTYPE
clippy::new_ret_no_self
style
new()
返回非
Self
类型
C-CONV / C-WRONG-SELF
clippy::wrong_self_convention
style
as_X(self)
接收
&self
,或
to_X(&self)
消耗 self
C-STRING-PATTERNS
clippy::single_char_pattern
perf
.contains("a")
→
.contains('a')
C-COMMON-TRAITS
clippy::derivable_impls
perf手动实现的 trait 可以通过 derive 派生
C-LARGE-NUMERIC
clippy::unreadable_literal
style
1000000
应写成
1_000_000
C-MUTABLE-KEY
clippy::mutable_key_type
suspicious
HashMap
的 key 类型是可变的
C-CLONE-ON-REF
clippy::clone_on_ref_ptr
restriction对
Rc
/
Arc
调用
.clone()
许多
restriction
和
pedantic
lint 默认关闭——应在 CI 中通过
#![warn(clippy::unwrap_used)]
或在
clippy.toml
中显式启用,以强制执行对应规范。

Workflow

工作流

  1. Format code —
    cargo fmt
    ensures consistent style
  2. Run Clippy —
    cargo clippy
    runs the 5 default groups (correctness, suspicious, style, complexity, perf); add
    -W clippy::pedantic
    for stricter
  3. Decide policy — pick pedantic/restriction level by project type (see table above); paste the matching config from
    references/clippy-lint-policy.md
  4. Configure
    clippy.toml
    — set
    msrv
    ,
    disallowed-methods
    , and any project-specific thresholds
  5. Use
    #[expect]
    for intentional suppressions — keeps CI honest about dead expectations
  6. Check Edition — Confirm edition in Cargo.toml is up-to-date
  7. CI integration —
    cargo fmt --check
    +
    cargo clippy -- -D warnings
    +
    cargo audit
    in CI
  1. 格式化代码——
    cargo fmt
    确保代码风格一致
  2. 运行 Clippy——
    cargo clippy
    运行 5 个默认组(correctness、suspicious、style、complexity、perf);如需更严格的检查,添加
    -W clippy::pedantic
  3. 决定策略——按项目类型选择 pedantic/restriction 级别(见上表),并粘贴
    references/clippy-lint-policy.md
    中对应的配置
  4. 配置
    clippy.toml
    ——设置
    msrv
    、
    disallowed-methods
    和项目特定的阈值
  5. 对有意进行的抑制使用
    #[expect]
    ——让 CI 如实暴露已经失效的预期
  6. 检查 Edition——确认 Cargo.toml 中的 edition 已是最新版本
  7. 集成 CI——在 CI 中运行
    cargo fmt --check
    +
    cargo clippy -- -D warnings
    +
    cargo audit

Gotchas

常见陷阱

  1. cargo clippy --fix
    only fixes lints at MachineApplicable level
  2. rustfmt config file is named
    .rustfmt.toml
    , not
    rustfmt.toml
  3. After edition migration, new warnings may appear — especially around unsafe_op_in_unsafe_fn in 2024
  4. cargo fix --edition
    does not fix all issues; manual review required after migration
  5. Prefer
    let ... else
    for early exits and
    is_some_and
    /
    then_some
    for simple boolean mapping; avoid compressing complex control flows just to use modern syntax
  6. saturating_*
    ,
    checked_*
    , and regular arithmetic expressions have different business semantics regarding overflow strategy — decide first, then select API
  1. cargo clippy --fix
    只能修复 MachineApplicable 级别的 lint
  2. rustfmt 配置文件名为
    .rustfmt.toml
    ,而不是
    rustfmt.toml
  3. Edition 迁移后可能出现新的警告——尤其是 2024 中与 unsafe_op_in_unsafe_fn 相关的问题
  4. cargo fix --edition
    无法修复所有问题;迁移后仍需手动审查
  5. 对于提前退出,优先使用
    let ... else
    ;对于简单的布尔值映射,使用
    is_some_and
    /
    then_some
    ;不要仅仅为了使用现代语法而压缩复杂的控制流
  6. saturating_*
    、
    checked_*
    和常规算术表达式在溢出策略方面具有不同的业务语义——应先确定策略,再选择 API

On-Demand Resources

按需资源

  • Format and Clippy Examples
  • Lint Group Quick Reference
  • Clippy Lint Policy: Full
    clippy.toml
    reference, all 10 lint groups in depth,
    #[expect]
    patterns,
    priority
    layering, and ready-to-paste production CI configurations by project type.
  • Production Rust Idioms: Review let-else, Option combinators, newtype patterns, non-exhaustive APIs, lock scopes, and overflow strategies when reviewing production code.
  • API Guidelines ↔ Clippy Lints Crosswalk: Full mapping from Rust API Guidelines
    C-*
    rules to the Clippy lints that enforce them, plus the ~75 rules Clippy does not cover and where to review them.
  • examples/golden-style/
    : Golden examples for CI passing rustfmt and Clippy
  • 格式化与 Clippy 示例
  • Lint 组速查
  • Clippy Lint 策略:完整的
    clippy.toml
    参考、全部 10 个 lint 组的深入说明、
    #[expect]
    模式、
    priority
    分层,以及按项目类型提供的可直接粘贴的生产环境 CI 配置。
  • 生产级 Rust 惯用法:审查生产代码中的 let-else、Option combinator、newtype 模式、non-exhaustive API、锁作用域和溢出策略。
  • API Guidelines ↔ Clippy Lints 对照表:从 Rust API Guidelines 的
    C-*
    规则到负责强制执行它们的 Clippy lint 的完整映射,同时涵盖 Clippy 尚未覆盖的约 75 条规则及其审查位置。
  • examples/golden-style/
    :可通过 CI 中 rustfmt 和 Clippy 检查的黄金示例

Official References

官方参考资料