]> 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 904036fe8886b4d4bd2e11dc4e362d9e3c2247f9..62cef778917b984083d1c69f7bda6ca6db06a770 100644 (file)
@@ -1,13 +1,3 @@
-// Copyright 2014-2018 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-
 macro_rules! declare_deprecated_lint {
     (pub $name: ident, $_reason: expr) => {
         declare_lint!(pub $name, Allow, "deprecated lint")
@@ -100,7 +90,7 @@ 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.
@@ -112,3 +102,14 @@ macro_rules! 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"
+}