about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorAleksei Latyshev <alex_700_95@mail.ru>2020-04-25 23:33:11 +0300
committerAleksei Latyshev <alex_700_95@mail.ru>2020-05-17 12:17:03 +0300
commit07f1edf2d43efa0ef53e5b6c56c895bc9738ab94 (patch)
tree5aca01abf7bd0e347521acb71630d65ee65ca09e /src
parentcb7f9679a63075b3fce2fdc69f7b02fe0f482464 (diff)
downloadrust-07f1edf2d43efa0ef53e5b6c56c895bc9738ab94.tar.gz
rust-07f1edf2d43efa0ef53e5b6c56c895bc9738ab94.zip
improve and generalize `option_and_then_some` lint
- rename it to bind_instead_of_map
Diffstat (limited to 'src')
-rw-r--r--src/lintlist/mod.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/lintlist/mod.rs b/src/lintlist/mod.rs
index e5e3bf453a0..5b4e2906b5f 100644
--- a/src/lintlist/mod.rs
+++ b/src/lintlist/mod.rs
@@ -67,6 +67,13 @@ pub static ref ALL_LINTS: Vec<Lint> = vec![
         module: "bit_mask",
     },
     Lint {
+        name: "bind_instead_of_map",
+        group: "complexity",
+        desc: "using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)`",
+        deprecation: None,
+        module: "methods",
+    },
+    Lint {
         name: "blacklisted_name",
         group: "style",
         desc: "usage of a blacklisted/placeholder name",
@@ -1579,13 +1586,6 @@ pub static ref ALL_LINTS: Vec<Lint> = vec![
         module: "eq_op",
     },
     Lint {
-        name: "option_and_then_some",
-        group: "complexity",
-        desc: "using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)`",
-        deprecation: None,
-        module: "methods",
-    },
-    Lint {
         name: "option_as_ref_deref",
         group: "complexity",
         desc: "using `as_ref().map(Deref::deref)`, which is more succinctly expressed as `as_deref()`",