Skip to content
Myr

Update for precise capture bounds

Before adoption: this commit came in with the history the project adopted, so no landing records it.

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))] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

authored by David Tolnay · committed by David Tolnay · parent 4b3178b · Browse files · 3 files+7 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

3 files+7 added−3 removed

  • other:+7 added−3 removed

3 files+7 added−3 removed

modified:serde_derive/src/internals/receiver.rs+3 added-1 removed
207 unmodified lines
208 fn visit_type_param_bound_mut(&mut self, bound: &mut TypeParamBound) {209 match bound {210 #![cfg_attr(all(test, exhaustive), deny(non_exhaustive_omitted_patterns))]211 TypeParamBound::Trait(bound) => self.visit_path_mut(&mut bound.path),212 TypeParamBound::Lifetime(_) | TypeParamBound::Verbatim(_) => {}212 TypeParamBound::Lifetime(_)213 | TypeParamBound::PreciseCapture(_)214 | TypeParamBound::Verbatim(_) => {}215 _ => {}216 }217 }218
76 unmodified lines
modified:serde_derive/src/bound.rs+3 added-1 removed
225 unmodified lines
226 fn visit_type_param_bound(&mut self, bound: &'ast syn::TypeParamBound) {227 match bound {228 #![cfg_attr(all(test, exhaustive), deny(non_exhaustive_omitted_patterns))]229 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(_) => {}233 _ => {}234 }235 }236
174 unmodified lines
modified:Cargo.toml+1 added-1 removed