Update for precise capture bounds

warning: some variants are not matched explicitly
       --> serde_derive/src/internals/receiver.rs:209:15
        |
    209 |         match bound {
        |               ^^^^^ pattern `&mut TypeParamBound::PreciseCapture(_)` not covered
        |
        = help: ensure that all variants are matched explicitly by adding the suggested match arms
        = note: the matched value is of type `&mut TypeParamBound` and the `non_exhaustive_omitted_patterns` attribute was found
    note: the lint level is defined here
       --> serde_derive/src/internals/receiver.rs:210:53
        |
    210 |             #![cfg_attr(all(test, exhaustive), deny(non_exhaustive_omitted_patterns))]
        |                                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    warning: some variants are not matched explicitly
       --> serde_derive/src/bound.rs:227:19
        |
    227 |             match bound {
        |                   ^^^^^ pattern `&TypeParamBound::PreciseCapture(_)` not covered
        |
        = help: ensure that all variants are matched explicitly by adding the suggested match arms
        = note: the matched value is of type `&TypeParamBound` and the `non_exhaustive_omitted_patterns` attribute was found
    note: the lint level is defined here
       --> serde_derive/src/bound.rs:228:57
        |
    228 |                 #![cfg_attr(all(test, exhaustive), deny(non_exhaustive_omitted_patterns))]
        |                                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This commit is contained in:
David Tolnay 2024-10-20 20:35:40 -07:00
parent 4b3178b053
commit 8b0f482666
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82
3 changed files with 7 additions and 3 deletions

View File

@ -12,4 +12,4 @@ serde = { path = "serde" }
[workspace.dependencies]
proc-macro2 = { version = "1.0.74", default-features = false }
quote = { version = "1.0.35", default-features = false }
syn = { version = "2.0.46", default-features = false }
syn = { version = "2.0.81", default-features = false }

View File

@ -227,7 +227,9 @@ pub fn with_bound(
match bound {
#![cfg_attr(all(test, exhaustive), deny(non_exhaustive_omitted_patterns))]
syn::TypeParamBound::Trait(bound) => self.visit_path(&bound.path),
syn::TypeParamBound::Lifetime(_) | syn::TypeParamBound::Verbatim(_) => {}
syn::TypeParamBound::Lifetime(_)
| syn::TypeParamBound::PreciseCapture(_)
| syn::TypeParamBound::Verbatim(_) => {}
_ => {}
}
}

View File

@ -209,7 +209,9 @@ impl ReplaceReceiver<'_> {
match bound {
#![cfg_attr(all(test, exhaustive), deny(non_exhaustive_omitted_patterns))]
TypeParamBound::Trait(bound) => self.visit_path_mut(&mut bound.path),
TypeParamBound::Lifetime(_) | TypeParamBound::Verbatim(_) => {}
TypeParamBound::Lifetime(_)
| TypeParamBound::PreciseCapture(_)
| TypeParamBound::Verbatim(_) => {}
_ => {}
}
}