]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/clippy/clippy_lints/src/trait_bounds.rs
Rollup merge of #104901 - krtab:filetype_compare, r=the8472
[rust.git] / src / tools / clippy / clippy_lints / src / trait_bounds.rs
index a25be93b8d61696f3f803e48ae294b5f02ef24fc..b5f11b4acae020e57f38d2fbf82cb0d7c1de57ea 100644 (file)
@@ -128,7 +128,7 @@ fn check_trait_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx TraitItem<'tc
                 if !bound_predicate.span.from_expansion();
                 if let TyKind::Path(QPath::Resolved(_, Path { segments, .. })) = bound_predicate.bounded_ty.kind;
                 if let Some(PathSegment {
-                    res: Res::SelfTy{ trait_: Some(def_id), alias_to: _ }, ..
+                    res: Res::SelfTyParam { trait_: def_id }, ..
                 }) = segments.first();
                 if let Some(
                     Node::Item(
@@ -215,9 +215,8 @@ impl Eq for SpanlessTy<'_, '_> {}
                         .map(|(_, _, span)| snippet_with_applicability(cx, span, "..", &mut applicability))
                         .join(" + ");
                     let hint_string = format!(
-                        "consider combining the bounds: `{}: {}`",
+                        "consider combining the bounds: `{}: {trait_bounds}`",
                         snippet(cx, p.bounded_ty.span, "_"),
-                        trait_bounds,
                     );
                     span_lint_and_help(
                         cx,