diff options
Diffstat (limited to 'vendor/serde_derive/src/bound.rs')
-rw-r--r-- | vendor/serde_derive/src/bound.rs | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/vendor/serde_derive/src/bound.rs b/vendor/serde_derive/src/bound.rs index 74c95069c..7bdb046ea 100644 --- a/vendor/serde_derive/src/bound.rs +++ b/vendor/serde_derive/src/bound.rs @@ -200,10 +200,16 @@ pub fn with_bound( for arg in &arguments.args { match arg { syn::GenericArgument::Type(arg) => self.visit_type(arg), - syn::GenericArgument::Binding(arg) => self.visit_type(&arg.ty), + syn::GenericArgument::AssocType(arg) => self.visit_type(&arg.ty), syn::GenericArgument::Lifetime(_) - | syn::GenericArgument::Constraint(_) - | syn::GenericArgument::Const(_) => {} + | syn::GenericArgument::Const(_) + | syn::GenericArgument::AssocConst(_) + | syn::GenericArgument::Constraint(_) => {} + #[cfg_attr( + all(test, exhaustive), + deny(non_exhaustive_omitted_patterns) + )] + _ => {} } } } @@ -226,7 +232,9 @@ pub fn with_bound( fn visit_type_param_bound(&mut self, bound: &'ast syn::TypeParamBound) { match bound { syn::TypeParamBound::Trait(bound) => self.visit_path(&bound.path), - syn::TypeParamBound::Lifetime(_) => {} + syn::TypeParamBound::Lifetime(_) | syn::TypeParamBound::Verbatim(_) => {} + #[cfg_attr(all(test, exhaustive), deny(non_exhaustive_omitted_patterns))] + _ => {} } } @@ -334,7 +342,7 @@ pub fn with_self_bound( pub fn with_lifetime_bound(generics: &syn::Generics, lifetime: &str) -> syn::Generics { let bound = syn::Lifetime::new(lifetime, Span::call_site()); - let def = syn::LifetimeDef { + let def = syn::LifetimeParam { attrs: Vec::new(), lifetime: bound.clone(), colon_token: None, |