about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorHirochika Matsumoto <matsujika@gmail.com>2020-09-20 02:03:14 +0900
committerHirochika Matsumoto <matsujika@gmail.com>2020-11-18 01:28:37 +0900
commita7ac441760ae034ff7401439b38da821f4e2df3a (patch)
tree9b3bf79c31cb587159e0697f10502fcf37cc7a75 /src
parentad4f82997a94cc91723daae14889f21428e65472 (diff)
downloadrust-a7ac441760ae034ff7401439b38da821f4e2df3a.tar.gz
rust-a7ac441760ae034ff7401439b38da821f4e2df3a.zip
Add new lint to detect unnecessarily wrapped value
Diffstat (limited to 'src')
-rw-r--r--src/lintlist/mod.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lintlist/mod.rs b/src/lintlist/mod.rs
index 69acd3d9b8b..4a0cdc5d82f 100644
--- a/src/lintlist/mod.rs
+++ b/src/lintlist/mod.rs
@@ -2609,6 +2609,13 @@ vec![
         module: "unwrap",
     },
     Lint {
+        name: "unnecessary_wrap",
+        group: "complexity",
+        desc: "functions that only return `Ok` or `Some`",
+        deprecation: None,
+        module: "unnecessary_wrap",
+    },
+    Lint {
         name: "unneeded_field_pattern",
         group: "restriction",
         desc: "struct fields bound to a wildcard instead of using `..`",