diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2023-11-08 18:24:49 +0000 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2023-11-19 17:50:45 +0000 |
| commit | 82babe0303eb0b40144ec6adb96878bec18a32a2 (patch) | |
| tree | 2ac81d504c6e033e5eb80824621ecb08fc862979 | |
| parent | 8c6c5424432bbb33910a7ef3d1d6e94ed77afa3b (diff) | |
| download | rust-82babe0303eb0b40144ec6adb96878bec18a32a2.tar.gz rust-82babe0303eb0b40144ec6adb96878bec18a32a2.zip | |
Don't sort `span_suggestions`, leave that to caller
| -rw-r--r-- | clippy_lints/src/booleans.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clippy_lints/src/booleans.rs b/clippy_lints/src/booleans.rs index d4f2e316890..2cb599964d2 100644 --- a/clippy_lints/src/booleans.rs +++ b/clippy_lints/src/booleans.rs @@ -424,8 +424,9 @@ impl<'a, 'tcx> NonminimalBoolVisitor<'a, 'tcx> { improvements.push(suggestion); } } - let nonminimal_bool_lint = |suggestions: Vec<_>| { + let nonminimal_bool_lint = |mut suggestions: Vec<_>| { if self.cx.tcx.lint_level_at_node(NONMINIMAL_BOOL, e.hir_id).0 != Level::Allow { + suggestions.sort(); span_lint_hir_and_then( self.cx, NONMINIMAL_BOOL, |
