Skip to content

Commit

Permalink
Update clippy_lints/src/format_args.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Cameron Steffen <cam.steffen94@gmail.com>
  • Loading branch information
smoelius and camsteffen authored Oct 13, 2021
1 parent 5db1f71 commit 88ed33c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clippy_lints/src/format_args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ fn check_to_string_in_format_args<'tcx>(cx: &LateContext<'tcx>, name: Symbol, ar
if let Some(method_def_id) = cx.typeck_results().type_dependent_def_id(value.hir_id);
if is_diag_trait_item(cx, method_def_id, sym::ToString);
let receiver_ty = cx.typeck_results().expr_ty(receiver);
if let Some(display_trait_id) = get_trait_def_id(cx, &paths::DISPLAY_TRAIT);
if let Some(display_trait_id) = cx.tcx.get_diagnostic_item(sym::Display);
if let Some(value_snippet) = snippet_opt(cx, value.span);
if let Some(dot) = value_snippet.rfind('.');
if let Some(receiver_snippet) = snippet_opt(cx, receiver.span);
Expand Down

0 comments on commit 88ed33c

Please sign in to comment.