]> git.lizzy.rs Git - rust.git/blobdiff - clippy_lints/src/explicit_write.rs
Merge remote-tracking branch 'upstream/master' into rustup
[rust.git] / clippy_lints / src / explicit_write.rs
index 0240e80d8141818757a9aee4e853b58f7ea277c0..f8038d06e50347ea90c317b7c194c7f69832ffe0 100644 (file)
@@ -5,6 +5,7 @@
 use rustc_hir::{BorrowKind, Expr, ExprKind};
 use rustc_lint::{LateContext, LateLintPass};
 use rustc_session::{declare_lint_pass, declare_tool_lint};
+use rustc_span::sym;
 
 declare_clippy_lint! {
     /// **What it does:** Checks for usage of `write!()` / `writeln()!` which can be
@@ -33,7 +34,7 @@ fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) {
         if_chain! {
             // match call to unwrap
             if let ExprKind::MethodCall(ref unwrap_fun, _, ref unwrap_args, _) = expr.kind;
-            if unwrap_fun.ident.name == sym!(unwrap);
+            if unwrap_fun.ident.name == sym::unwrap;
             // match call to write_fmt
             if !unwrap_args.is_empty();
             if let ExprKind::MethodCall(ref write_fun, _, write_args, _) =