Skip to content

Commit f0be2da

Browse files
xiongmao86flip1995
andauthored
Update clippy_lints/src/utils/internal_lints.rs
Co-Authored-By: Philipp Krones <[email protected]>
1 parent 6a319f2 commit f0be2da

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

clippy_lints/src/utils/internal_lints.rs

+8-6
Original file line numberDiff line numberDiff line change
@@ -146,12 +146,14 @@ declare_clippy_lint! {
146146
}
147147

148148
declare_clippy_lint! {
149-
/// **What it does:** When `span_lint_and_then` function call and its
150-
/// closure have one statment that is a method call of `span_suggestion`,
151-
/// `span_help`, or `span_note` are using the same span argument,
152-
/// or when closure have one statment that is a function call of `note` or
153-
/// `help`, they should be replaced with one of three function calls which is
154-
/// `span_lint_and_sugg`, span_lint_and_help` or `span_lint_and_note`.
149+
/// **What it does:** Lints `span_lint_and_then` function calls, where the
150+
/// closure argument has only one statement and that statement is a method
151+
/// call to `span_suggestion`, `span_help`, `span_note` (using the same
152+
/// span), `help` or `note`.
153+
///
154+
/// These usages of `span_lint_and_then` should be replaced with one of the
155+
/// wrapper functions `span_lint_and_sugg`, span_lint_and_help`, or
156+
/// `span_lint_and_note`.
155157
///
156158
/// **Why is this bad?** There are wrapper `span_lint_and_*` functions, it is
157159
/// convenient, more readable and more error resistant to use wrapper functions.

0 commit comments

Comments
 (0)