aboutsummaryrefslogtreecommitdiff
path: root/src/transform.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/transform.rs')
-rw-r--r--src/transform.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/transform.rs b/src/transform.rs
index 74ab9e6..eed48c4 100644
--- a/src/transform.rs
+++ b/src/transform.rs
@@ -26,6 +26,7 @@ pub enum TransformError {
UnsupportedType,
ExpectedAtLeastNTypes(usize),
AssocTypeAfterFirstNTypes(usize, Ident),
+ QualifiedAssociatedType,
QualifiedSelfAssociatedType,
}
@@ -119,6 +120,9 @@ impl TypeConverter<'_> {
{
if let Type::Path(self_path) = qself.ty.as_ref() {
if self_path.path.segments[0].ident == "Self" {
+ if !self_path.path.is_ident("Self") {
+ return Err((self_path.span(), TransformError::QualifiedAssociatedType));
+ }
return Err((
self_path.span(),
TransformError::QualifiedSelfAssociatedType,