diff options
author | Martin Fischer <martin@push-f.com> | 2021-11-19 11:49:22 +0100 |
---|---|---|
committer | Martin Fischer <martin@push-f.com> | 2021-11-19 12:09:55 +0100 |
commit | 323762d238ebb9d9b8fa65bd1290aaa39648615c (patch) | |
tree | bba4645bf2fef6307018fe9187a19687149cbfbd /src/parse_trait_sig.rs | |
parent | a11255acdf3b3fac12d8f51048f0bed2c0df8a11 (diff) |
if first type bound isn't Into<T> auto-box it
Diffstat (limited to 'src/parse_trait_sig.rs')
-rw-r--r-- | src/parse_trait_sig.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/parse_trait_sig.rs b/src/parse_trait_sig.rs index b7b7b3f..76402ac 100644 --- a/src/parse_trait_sig.rs +++ b/src/parse_trait_sig.rs @@ -6,6 +6,7 @@ use syn::{ }; use syn::{Ident, Signature, TypeImplTrait}; +use crate::parse_assoc_type::BoxType; use crate::syn_utils::{find_in_type, trait_bounds, TypeMatcher}; use crate::transform::{dynamize_function_bounds, AssocTypeConversions, TransformError}; use crate::AssocTypeMatcher; @@ -14,6 +15,7 @@ use crate::AssocTypeMatcher; pub enum TypeTransform { NoOp, Into, + Box(BoxType), Map(Box<TypeTransform>), Result(Box<TypeTransform>, Box<TypeTransform>), } |