Skip to content

Commit

Permalink
Fill in omitted patterns for GenericArguments match
Browse files Browse the repository at this point in the history
    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))]
         |                                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  • Loading branch information
dtolnay committed Jan 4, 2024
1 parent d2d977a commit 8bc71de
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion serde_derive/src/internals/attr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1829,7 +1829,10 @@ fn collect_lifetimes(ty: &syn::Type, out: &mut BTreeSet<syn::Lifetime>) {
syn::GenericArgument::AssocType(binding) => {
collect_lifetimes(&binding.ty, out);
}
_ => {}
syn::GenericArgument::Const(_)
| syn::GenericArgument::AssocConst(_)
| syn::GenericArgument::Constraint(_)
| _ => {}
}
}
}
Expand Down

0 comments on commit 8bc71de

Please sign in to comment.