Implement derive macros expansion tests using macrotest

This commit is contained in:
Evgenii P
2019-11-01 02:32:06 +08:00
parent 2ceabad360
commit dc6dbba47c
13 changed files with 112 additions and 0 deletions
@@ -0,0 +1,14 @@
use serde::{Serialize, Deserialize};
trait AssociatedType {
type X;
}
impl AssociatedType for i32 {
type X = i32;
}
#[derive(Serialize, Deserialize)]
struct DefaultTyParam<T: AssociatedType<X = i32> = i32> {
phantom: PhantomData<T>,
}