diff options
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 { |