Skip to content

Commit 8bc71de

Browse files
committed
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))] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1 parent d2d977a commit 8bc71de

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

serde_derive/src/internals/attr.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1829,7 +1829,10 @@ fn collect_lifetimes(ty: &syn::Type, out: &mut BTreeSet<syn::Lifetime>) {
18291829
syn::GenericArgument::AssocType(binding) => {
18301830
collect_lifetimes(&binding.ty, out);
18311831
}
1832-
_ => {}
1832+
syn::GenericArgument::Const(_)
1833+
| syn::GenericArgument::AssocConst(_)
1834+
| syn::GenericArgument::Constraint(_)
1835+
| _ => {}
18331836
}
18341837
}
18351838
}

0 commit comments

Comments
 (0)