about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-12-23 06:16:37 +0000
committerbors <bors@rust-lang.org>2019-12-23 06:16:37 +0000
commitb38b026a989aebbca3df2346f47f449c96eeda7a (patch)
tree150b47e7ff01454d8c4a44318853e5f3d45cc9bb /src
parent40881e771373677ffd85596526e8870ba59ad384 (diff)
parenta310cb2d0b708a46fda5c4b6f91a3221c25842c6 (diff)
downloadrust-b38b026a989aebbca3df2346f47f449c96eeda7a.tar.gz
rust-b38b026a989aebbca3df2346f47f449c96eeda7a.zip
Auto merge of #4823 - Areredify:must_use_res, r=flip1995
Add `let_underscore_must_use` lint

changelog: closes #4812 , added a new `let_underscore_must_use` lint, moved `is_must_use_ty` to utils, added `is_must_use_fn` util function
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 f3012fba2da..913e941660e 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; 339] = [
+pub const ALL_LINTS: [Lint; 340] = [
     Lint {
         name: "absurd_extreme_comparisons",
         group: "correctness",
@@ -939,6 +939,13 @@ pub const ALL_LINTS: [Lint; 339] = [
         module: "returns",
     },
     Lint {
+        name: "let_underscore_must_use",
+        group: "restriction",
+        desc: "non-binding let on a #[must_use] expression",
+        deprecation: None,
+        module: "let_underscore",
+    },
+    Lint {
         name: "let_unit_value",
         group: "style",
         desc: "creating a let binding to a value of unit type, which usually can\'t be used afterwards",