]> git.lizzy.rs Git - rust.git/blobdiff - clippy_lints/src/deprecated_lints.rs
Auto merge of #3946 - rchaser53:issue-3920, r=flip1995
[rust.git] / clippy_lints / src / deprecated_lints.rs
index 983f347c56f5762d494f480dfb6957488e6396f6..62cef778917b984083d1c69f7bda6ca6db06a770 100644 (file)
@@ -6,7 +6,7 @@ macro_rules! declare_deprecated_lint {
 
 /// **What it does:** Nothing. This lint has been deprecated.
 ///
-/// **Deprecation reason:** This used to check for `assert!(a == b)` and recommend 
+/// **Deprecation reason:** This used to check for `assert!(a == b)` and recommend
 /// replacement with `assert_eq!(a, b)`, but this is no longer needed after RFC 2011.
 declare_deprecated_lint! {
     pub SHOULD_ASSERT_EQ,
@@ -90,5 +90,26 @@ macro_rules! declare_deprecated_lint {
 /// counterparts, so this lint may suggest a change in behavior or the code may not compile.
 declare_deprecated_lint! {
     pub ASSIGN_OPS,
-    "using compound assignment operators (e.g. `+=`) is harmless"
+    "using compound assignment operators (e.g., `+=`) is harmless"
+}
+
+/// **What it does:** Nothing. This lint has been deprecated.
+///
+/// **Deprecation reason:** The original rule will only lint for `if let`. After
+/// making it support to lint `match`, naming as `if let` is not suitable for it.
+/// So, this lint is deprecated.
+declare_deprecated_lint! {
+    pub IF_LET_REDUNDANT_PATTERN_MATCHING,
+    "this lint has been changed to redundant_pattern_matching"
+}
+
+/// **What it does:** Nothing. This lint has been deprecated.
+///
+/// **Deprecation reason:** This lint used to suggest replacing `let mut vec =
+/// Vec::with_capacity(n); vec.set_len(n);` with `let vec = vec![0; n];`. The
+/// replacement has very different performance characteristics so the lint is
+/// deprecated.
+declare_deprecated_lint! {
+    pub UNSAFE_VECTOR_INITIALIZATION,
+    "the replacement suggested by this lint had substantially different behavior"
 }