From 8bc71def551df190e6817d3311e5c76f751f53e6 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Wed, 3 Jan 2024 18:38:37 -0800 Subject: [PATCH] Fill in omitted patterns for GenericArguments match error: some variants are not matched explicitly --> serde_derive/src/internals/attr.rs:1823:31 | 1823 | match arg { | ^^^ patterns `&GenericArgument::Const(_)`, `&GenericArgument::AssocConst(_)` and `&GenericArgument::Constraint(_)` not covered | = help: ensure that all variants are matched explicitly by adding the suggested match arms = note: the matched value is of type `&GenericArgument` and the `non_exhaustive_omitted_patterns` attribute was found note: the lint level is defined here --> serde_derive/src/internals/attr.rs:1797:49 | 1797 | #![cfg_attr(all(test, exhaustive), deny(non_exhaustive_omitted_patterns))] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ --- serde_derive/src/internals/attr.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/serde_derive/src/internals/attr.rs b/serde_derive/src/internals/attr.rs index 0b25c7c0d..58d18b403 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(_) + | _ => {} } } }