Skip to content

Commit 4363610

Browse files
docs
1 parent dbe9a2f commit 4363610

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

clippy_lints/src/single_field_patterns.rs

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#![allow(rustc::usage_of_ty_tykind)]
22

33
use clippy_utils::{
4-
diagnostics::{multispan_sugg_with_applicability, span_lint, span_lint_and_then},
4+
diagnostics::{multispan_sugg_with_applicability, span_lint_and_then},
55
higher::IfLetOrMatch,
66
higher::WhileLet,
77
source::snippet_opt,
@@ -19,18 +19,10 @@ declare_clippy_lint! {
1919
/// Checks for patterns that only use a single field when they could directly access the field.
2020
///
2121
/// ### Why is this bad?
22-
/// It requires more information than directly accessing the field.
22+
/// It requires more text and more information than directly accessing the field.
2323
///
24-
/// ### Known Issue
25-
/// This isn't aware of conditional compilation, e.g.
26-
/// ```rust
27-
/// match maybe_enum {
28-
/// Enum::Always(a) => {},
29-
/// #[cfg(feature = "razzle")]
30-
/// Enum::Dazzle(a, b, c) => {},
31-
/// }
32-
/// ```
33-
/// Supporting that would require rustc changes.
24+
/// ### Known problems
25+
/// This isn't aware of conditional compilation, because supporting that would require rustc changes.
3426
///
3527
/// ### Example
3628
/// ```rust

0 commit comments

Comments
 (0)