- match bounds_iter.next().unwrap() {
- syn::TypeParamBound::Trait(tr) => {
- assert_simple_bound(&tr);
- if let Some(mut path) = types.maybe_resolve_path(&tr.path, None) {
- if types.skip_path(&path) { continue; }
- // In general we handle Deref<Target=X> as if it were just X (and
- // implement Deref<Target=Self> for relevant types). We don't
- // bother to implement it for associated types, however, so we just
- // ignore such bounds.
- let new_ident = if path != "std::ops::Deref" && path != "core::ops::Deref" {
- path = "crate::".to_string() + &path;
- Some(&tr.path)
- } else { None };
- self.typed_generics.insert(&t.ident, (path, new_ident));
- } else { unimplemented!(); }
- },
- _ => unimplemented!(),
+ loop {
+ match bounds_iter.next().unwrap() {
+ syn::TypeParamBound::Trait(tr) => {
+ assert_simple_bound(&tr);
+ if let Some(path) = types.maybe_resolve_path(&tr.path, None) {
+ if types.skip_path(&path) { continue; }
+ // In general we handle Deref<Target=X> as if it were just X (and
+ // implement Deref<Target=Self> for relevant types). We don't
+ // bother to implement it for associated types, however, so we just
+ // ignore such bounds.
+ if path != "std::ops::Deref" && path != "core::ops::Deref" {
+ self.typed_generics.insert(&t.ident, path);
+ }
+ } else { unimplemented!(); }
+ for bound in bounds_iter {
+ if let syn::TypeParamBound::Trait(_) = bound { unimplemented!(); }
+ }
+ break;
+ },
+ syn::TypeParamBound::Lifetime(_) => {},
+ }