]> git.lizzy.rs Git - rust.git/blobdiff - clippy_lints/src/inherent_to_string.rs
modify code
[rust.git] / clippy_lints / src / inherent_to_string.rs
index 60d234cd6f08f19fcb904f3b68df5a5ccab418b1..55c04a1186fc3376fce1d70124b972727d9e0163 100644 (file)
@@ -116,7 +116,7 @@ fn check_impl_item(&mut self, cx: &LateContext<'tcx>, impl_item: &'tcx ImplItem<
             if is_type_diagnostic_item(cx, return_ty(cx, impl_item.hir_id()), sym::String);
 
             // Filters instances of to_string which are required by a trait
-            if trait_ref_of_method(cx, impl_item.hir_id()).is_none();
+            if trait_ref_of_method(cx, impl_item.def_id).is_none();
 
             then {
                 show_lint(cx, impl_item);