diff options
| author | bors <bors@rust-lang.org> | 2022-06-22 23:59:16 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-06-22 23:59:16 +0000 |
| commit | 2cc5211584c7d813860706bafa49ee70c38a1f7b (patch) | |
| tree | c635b7157dd1fdc1b0d3f8d9e4d5f191ea724e1a | |
| parent | 6985e6592b36d49d2a0ae4184d44f82d4b763fb5 (diff) | |
| parent | b969326874ecd1f0a9e52aab629d089f258039b4 (diff) | |
| download | rust-2cc5211584c7d813860706bafa49ee70c38a1f7b.tar.gz rust-2cc5211584c7d813860706bafa49ee70c38a1f7b.zip | |
Auto merge of #9034 - alex-semenyuk:example_vec_resize_to_zero, r=giraffate
Example for VEC_RESIZE_TO_ZERO changelog: none Example for VEC_RESIZE_TO_ZERO - what we should use instead
| -rw-r--r-- | clippy_lints/src/vec_resize_to_zero.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clippy_lints/src/vec_resize_to_zero.rs b/clippy_lints/src/vec_resize_to_zero.rs index 4d86abd0fa1..0fee3e812d2 100644 --- a/clippy_lints/src/vec_resize_to_zero.rs +++ b/clippy_lints/src/vec_resize_to_zero.rs @@ -20,6 +20,11 @@ declare_clippy_lint! { /// ```rust /// vec!(1, 2, 3, 4, 5).resize(0, 5) /// ``` + /// + /// Use instead: + /// ```rust + /// vec!(1, 2, 3, 4, 5).clear() + /// ``` #[clippy::version = "1.46.0"] pub VEC_RESIZE_TO_ZERO, correctness, |
