about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorLzu Tao <taolzu@gmail.com>2019-08-15 10:53:11 +0700
committerLzu Tao <taolzu@gmail.com>2019-08-19 03:54:40 +0000
commit7065239da55420e26adb7cb647fc7eb4e9c8798e (patch)
tree9dfb12798a488e266c1cd7e52ea6ebd35fcb9972 /src
parentf01a0c0e08b5905f174d30201b0cb927f5cad500 (diff)
downloadrust-7065239da55420e26adb7cb647fc7eb4e9c8798e.tar.gz
rust-7065239da55420e26adb7cb647fc7eb4e9c8798e.zip
Add option_and_then_some lint
Diffstat (limited to 'src')
-rw-r--r--src/lintlist/mod.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/lintlist/mod.rs b/src/lintlist/mod.rs
index 485352f5cc4..9abe4558bb9 100644
--- a/src/lintlist/mod.rs
+++ b/src/lintlist/mod.rs
@@ -6,7 +6,7 @@ pub use lint::Lint;
 pub use lint::LINT_LEVELS;
 
 // begin lint list, do not remove this comment, it’s used in `update_lints`
-pub const ALL_LINTS: [Lint; 310] = [
+pub const ALL_LINTS: [Lint; 311] = [
     Lint {
         name: "absurd_extreme_comparisons",
         group: "correctness",
@@ -1317,6 +1317,13 @@ pub const ALL_LINTS: [Lint; 310] = [
         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_map_or_none",
         group: "style",
         desc: "using `Option.map_or(None, f)`, which is more succinctly expressed as `and_then(f)`",