mirror of
https://github.com/rust-lang/rust-clippy
synced 2025-02-17 14:38:46 +00:00
resolve build warnings in clippy_lints/src/format.rs
This commit is contained in:
parent
93de5fc6c8
commit
fd5ea0ddf7
1 changed files with 1 additions and 2 deletions
|
@ -4,7 +4,6 @@ use crate::rustc::{declare_tool_lint, lint_array};
|
|||
use if_chain::if_chain;
|
||||
use crate::rustc::ty;
|
||||
use crate::syntax::ast::LitKind;
|
||||
use crate::syntax_pos::Span;
|
||||
use crate::utils::paths;
|
||||
use crate::utils::{in_macro, is_expn_of, last_path_segment, match_def_path, match_type, opt_def_id, resolve_node, snippet, span_lint_and_then, walk_ptrs_ty};
|
||||
use crate::rustc_errors::Applicability;
|
||||
|
@ -60,7 +59,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
|
|||
if let ExprKind::AddrOf(_, ref format_arg) = format_arg.node;
|
||||
then {
|
||||
let (message, sugg) = if_chain! {
|
||||
if let ExprKind::MethodCall(ref path, ref span, ref expr) = format_arg.node;
|
||||
if let ExprKind::MethodCall(ref path, _, _) = format_arg.node;
|
||||
if path.ident.as_interned_str() == "to_string";
|
||||
then {
|
||||
("`to_string()` is enough",
|
||||
|
|
Loading…
Add table
Reference in a new issue