Skip to content

Commit 8b0f482

Browse files
committed
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))] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1 parent 4b3178b commit 8b0f482

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ serde = { path = "serde" }
1212
[workspace.dependencies]
1313
proc-macro2 = { version = "1.0.74", default-features = false }
1414
quote = { version = "1.0.35", default-features = false }
15-
syn = { version = "2.0.46", default-features = false }
15+
syn = { version = "2.0.81", default-features = false }

serde_derive/src/bound.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,9 @@ pub fn with_bound(
227227
match bound {
228228
#![cfg_attr(all(test, exhaustive), deny(non_exhaustive_omitted_patterns))]
229229
syn::TypeParamBound::Trait(bound) => self.visit_path(&bound.path),
230-
syn::TypeParamBound::Lifetime(_) | syn::TypeParamBound::Verbatim(_) => {}
230+
syn::TypeParamBound::Lifetime(_)
231+
| syn::TypeParamBound::PreciseCapture(_)
232+
| syn::TypeParamBound::Verbatim(_) => {}
231233
_ => {}
232234
}
233235
}

serde_derive/src/internals/receiver.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,9 @@ impl ReplaceReceiver<'_> {
209209
match bound {
210210
#![cfg_attr(all(test, exhaustive), deny(non_exhaustive_omitted_patterns))]
211211
TypeParamBound::Trait(bound) => self.visit_path_mut(&mut bound.path),
212-
TypeParamBound::Lifetime(_) | TypeParamBound::Verbatim(_) => {}
212+
TypeParamBound::Lifetime(_)
213+
| TypeParamBound::PreciseCapture(_)
214+
| TypeParamBound::Verbatim(_) => {}
213215
_ => {}
214216
}
215217
}

0 commit comments

Comments
 (0)