Fix #10504, don't lint on derived code

This commit is contained in:
Centri3 2023-06-05 14:38:38 -05:00
parent b033883e2b
commit 6ea7cd8ec7
3 changed files with 22 additions and 4 deletions

View file

@ -260,6 +260,9 @@ impl TraitBounds {
SpanlessTy { ty: p.bounded_ty, cx },
p.bounds.iter().collect::<Vec<_>>()
);
if let TyKind::Path(qpath) = p.bounded_ty.kind;
if format!("{}:", rustc_hir_pretty::qpath_to_string(&qpath))
== format!("{}:", snippet(cx, p.bounded_ty.span, "_"));
then {
let trait_bounds = v