aboutsummaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
authorMartin Fischer <martin@push-f.com>2021-11-25 13:48:26 +0100
committerMartin Fischer <martin@push-f.com>2021-11-25 13:48:46 +0100
commit8046190e8f537407210fb87acbfe96d4084d58da (patch)
tree34c093627f5fd75db82cb8fb48402b82ace7d803 /src/lib.rs
parent74a29b912aaa14dbeb7e5c51ae11c61e733ef645 (diff)
support Self qualified as same trait
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/lib.rs b/src/lib.rs
index fc559bc..f8fdde8 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -85,7 +85,8 @@ pub fn dynamize(_attr: TokenStream, input: TokenStream) -> TokenStream {
let mut type_converter = TypeConverter {
collections: method_attrs.collections,
- ..TypeConverter::default()
+ assoc_type_conversions: HashMap::new(),
+ trait_ident: original_trait.ident.clone(),
};
for item in &original_trait.items {
@@ -158,8 +159,8 @@ pub fn dynamize(_attr: TokenStream, input: TokenStream) -> TokenStream {
MethodError::Transform(TransformError::QualifiedAssociatedType) => {
return abort!(span, "dynamize does not support qualified associated types")
}
- MethodError::Transform(TransformError::QualifiedSelfAssociatedType) => {
- return abort!(span, "dynamize does not support associated types of a qualified Self")
+ MethodError::Transform(TransformError::SelfQualifiedAsOtherTrait) => {
+ return abort!(span, "dynamize does not support Self qualified as another trait")
}
MethodError::UnconvertedAssocType => {
return abort!(span, "dynamize does not support associated types here")