]> git.lizzy.rs Git - rust.git/blobdiff - clippy_lints/src/let_underscore.rs
Rustup to rust-lang/rust#67806
[rust.git] / clippy_lints / src / let_underscore.rs
index 4933b3049c28166f22d4ab41061418db3c7695f9..62efcb6b65c599c4488adb9536801b4745aefeb1 100644 (file)
@@ -1,8 +1,7 @@
 use if_chain::if_chain;
-use rustc::declare_lint_pass;
-use rustc::hir::*;
-use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};
-use rustc_session::declare_tool_lint;
+use rustc::lint::{LateContext, LateLintPass};
+use rustc_hir::*;
+use rustc_session::{declare_lint_pass, declare_tool_lint};
 
 use crate::utils::{is_must_use_func_call, is_must_use_ty, span_help_and_lint};
 
@@ -27,7 +26,7 @@
     /// ```
     pub LET_UNDERSCORE_MUST_USE,
     restriction,
-    "non-binding let on a #[must_use] expression"
+    "non-binding let on a `#[must_use]` expression"
 }
 
 declare_lint_pass!(LetUnderscore => [LET_UNDERSCORE_MUST_USE]);
@@ -44,7 +43,7 @@ fn check_stmt(&mut self, cx: &LateContext<'_, '_>, stmt: &Stmt<'_>) {
                         cx,
                         LET_UNDERSCORE_MUST_USE,
                         stmt.span,
-                        "non-binding let on an expression with #[must_use] type",
+                        "non-binding let on an expression with `#[must_use]` type",
                         "consider explicitly using expression value"
                     )
                 } else if is_must_use_func_call(cx, init) {
@@ -52,7 +51,7 @@ fn check_stmt(&mut self, cx: &LateContext<'_, '_>, stmt: &Stmt<'_>) {
                         cx,
                         LET_UNDERSCORE_MUST_USE,
                         stmt.span,
-                        "non-binding let on a result of a #[must_use] function",
+                        "non-binding let on a result of a `#[must_use]` function",
                         "consider explicitly using function result"
                     )
                 }