aboutsummaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 1c7220f..4c1675c 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -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 {