aboutsummaryrefslogtreecommitdiff
path: root/src/bound.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/bound.rs')
-rw-r--r--src/bound.rs18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/bound.rs b/src/bound.rs
index 74c9506..7bdb046 100644
--- a/src/bound.rs
+++ b/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,