aboutsummaryrefslogtreecommitdiff
path: root/src/parse_trait_sig.rs
diff options
context:
space:
mode:
authorMartin Fischer <martin@push-f.com>2021-11-19 11:49:22 +0100
committerMartin Fischer <martin@push-f.com>2021-11-19 12:09:55 +0100
commit323762d238ebb9d9b8fa65bd1290aaa39648615c (patch)
treebba4645bf2fef6307018fe9187a19687149cbfbd /src/parse_trait_sig.rs
parenta11255acdf3b3fac12d8f51048f0bed2c0df8a11 (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.rs2
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>),
}