diff options
author | Martin Fischer <martin@push-f.com> | 2021-11-19 10:51:57 +0100 |
---|---|---|
committer | Martin Fischer <martin@push-f.com> | 2021-11-19 10:51:57 +0100 |
commit | fb4ba51a742cb7b61c2e0c3059aba9c689b411e8 (patch) | |
tree | 426116acc038cef761b2108ae98ba51e4855e8ba /src/parse_trait_sig.rs | |
parent | d8a313dd422c78fb018cfe4249b526fe3e9dc851 (diff) |
refactor: make destination type mechanism extensible
Diffstat (limited to 'src/parse_trait_sig.rs')
-rw-r--r-- | src/parse_trait_sig.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/parse_trait_sig.rs b/src/parse_trait_sig.rs index 5b1f91a..b7b7b3f 100644 --- a/src/parse_trait_sig.rs +++ b/src/parse_trait_sig.rs @@ -141,6 +141,7 @@ mod tests { use syn::{TraitItemMethod, Type}; use crate::{ + parse_assoc_type::DestType, parse_trait_sig::{ parse_trait_signature, MethodParseError, SignatureChanges, TypeTransform, }, @@ -172,8 +173,9 @@ mod tests { let mut assoc_type_map = AssocTypeConversions::default(); let ident = format_ident!("A"); - let dest = Type::Verbatim(quote! {Example}); - assoc_type_map.0.insert(ident, &dest); + let dest_inner = Type::Verbatim(quote! {Example}); + let dest = DestType::Into(&dest_inner); + assoc_type_map.0.insert(ident, dest); assert!(matches!( parse_trait_signature(&mut type1.sig, &assoc_type_map), |