diff --git a/serde_derive/src/internals/attr.rs b/serde_derive/src/internals/attr.rs index 0b25c7c0..58d18b40 100644 --- a/serde_derive/src/internals/attr.rs +++ b/serde_derive/src/internals/attr.rs @@ -1829,7 +1829,10 @@ fn collect_lifetimes(ty: &syn::Type, out: &mut BTreeSet) { syn::GenericArgument::AssocType(binding) => { collect_lifetimes(&binding.ty, out); } - _ => {} + syn::GenericArgument::Const(_) + | syn::GenericArgument::AssocConst(_) + | syn::GenericArgument::Constraint(_) + | _ => {} } } }