about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorflip1995 <philipp.krones@embecosm.com>2020-11-05 14:29:48 +0100
committerflip1995 <philipp.krones@embecosm.com>2020-11-05 14:29:48 +0100
commit34244190d45d80bf66a0eec0d04f0254efd4c754 (patch)
tree74a0de1b64324dc57f315f8af4670b1a7fc087ca /src
parent0c1531a5c4269b0d0bc7cff53420f936b42ce1ab (diff)
downloadrust-34244190d45d80bf66a0eec0d04f0254efd4c754.tar.gz
rust-34244190d45d80bf66a0eec0d04f0254efd4c754.zip
Merge commit 'b20d4c155d2fe3a8391f86dcf9a8c49e17188703' into clippyup
Diffstat (limited to 'src')
-rw-r--r--src/lintlist/mod.rs56
1 files changed, 49 insertions, 7 deletions
diff --git a/src/lintlist/mod.rs b/src/lintlist/mod.rs
index c2e63ecb581..702f9d86de6 100644
--- a/src/lintlist/mod.rs
+++ b/src/lintlist/mod.rs
@@ -299,6 +299,13 @@ vec![
         module: "comparison_chain",
     },
     Lint {
+        name: "comparison_to_empty",
+        group: "style",
+        desc: "checking `x == \"\"` or `x == []` (or similar) when `.is_empty()` could be used instead",
+        deprecation: None,
+        module: "len_zero",
+    },
+    Lint {
         name: "copy_iterator",
         group: "pedantic",
         desc: "implementing `Iterator` on a `Copy` type",
@@ -352,7 +359,7 @@ vec![
         group: "pedantic",
         desc: "checks for literal calls to `Default::default()`",
         deprecation: None,
-        module: "default_trait_access",
+        module: "default",
     },
     Lint {
         name: "deprecated_cfg_attr",
@@ -621,6 +628,13 @@ vec![
         module: "fallible_impl_from",
     },
     Lint {
+        name: "field_reassign_with_default",
+        group: "style",
+        desc: "binding initialized with Default should have its fields set in the initializer",
+        deprecation: None,
+        module: "default",
+    },
+    Lint {
         name: "filetype_is_file",
         group: "restriction",
         desc: "`FileType::is_file` is not recommended to test for readable file type",
@@ -747,6 +761,13 @@ vec![
         module: "drop_forget_ref",
     },
     Lint {
+        name: "from_iter_instead_of_collect",
+        group: "style",
+        desc: "use `.collect()` instead of `::from_iter()`",
+        deprecation: None,
+        module: "methods",
+    },
+    Lint {
         name: "future_not_send",
         group: "nursery",
         desc: "public Futures must be Send",
@@ -1174,6 +1195,13 @@ vec![
         module: "manual_non_exhaustive",
     },
     Lint {
+        name: "manual_ok_or",
+        group: "pedantic",
+        desc: "finds patterns that can be encoded more concisely with `Option::ok_or`",
+        deprecation: None,
+        module: "manual_ok_or",
+    },
+    Lint {
         name: "manual_range_contains",
         group: "style",
         desc: "manually reimplementing {`Range`, `RangeInclusive`}`::contains`",
@@ -1223,6 +1251,13 @@ vec![
         module: "map_clone",
     },
     Lint {
+        name: "map_collect_result_unit",
+        group: "style",
+        desc: "using `.map(_).collect::<Result<(),_>()`, which can be replaced with `try_for_each`",
+        deprecation: None,
+        module: "methods",
+    },
+    Lint {
         name: "map_entry",
         group: "perf",
         desc: "use of `contains_key` followed by `insert` on a `HashMap` or `BTreeMap`",
@@ -2014,6 +2049,13 @@ vec![
         module: "reference",
     },
     Lint {
+        name: "ref_option_ref",
+        group: "pedantic",
+        desc: "use `Option<&T>` instead of `&Option<&T>`",
+        deprecation: None,
+        module: "ref_option_ref",
+    },
+    Lint {
         name: "repeat_once",
         group: "complexity",
         desc: "using `.repeat(1)` instead of `String.clone()`, `str.to_string()` or `slice.to_vec()` ",
@@ -2133,16 +2175,16 @@ vec![
         module: "non_expressive_names",
     },
     Lint {
-        name: "single_char_pattern",
-        group: "perf",
-        desc: "using a single-character str where a char could be used, e.g., `_.split(\"x\")`",
+        name: "single_char_add_str",
+        group: "style",
+        desc: "`push_str()` or `insert_str()` used with a single-character string literal as parameter",
         deprecation: None,
         module: "methods",
     },
     Lint {
-        name: "single_char_push_str",
-        group: "style",
-        desc: "`push_str()` used with a single-character string literal as parameter",
+        name: "single_char_pattern",
+        group: "perf",
+        desc: "using a single-character str where a char could be used, e.g., `_.split(\"x\")`",
         deprecation: None,
         module: "methods",
     },