diff options
| author | Martin Fischer <martin@push-f.com> | 2021-11-25 13:04:38 +0100 | 
|---|---|---|
| committer | Martin Fischer <martin@push-f.com> | 2021-11-25 13:40:30 +0100 | 
| commit | 88f33dee26815c3382bfb18c800f3f54b6397e20 (patch) | |
| tree | 9f8a36a62ff0b6d64ffebe3fed04c8e1d37947a9 /src/lib.rs | |
| parent | dc568083381d2073f0cfcfad8fa58158bd5bf811 (diff) | |
also detect <Self as Foo>::X in generic type args
Diffstat (limited to 'src/lib.rs')
| -rw-r--r-- | src/lib.rs | 12 | 
1 files changed, 11 insertions, 1 deletions
| @@ -373,7 +373,17 @@ fn generate_blanket_impl(  }  fn path_is_assoc_type(path: &TypePath) -> bool { -    path.path.segments[0].ident == "Self" +    if path.path.segments[0].ident == "Self" { +        return true; +    } +    if let Some(qself) = &path.qself { +        if let Type::Path(path) = qself.ty.as_ref() { +            if path.path.segments[0].ident == "Self" { +                return true; +            } +        } +    } +    false  }  fn match_assoc_type(item: &Type) -> bool { | 
