Files
serde/test_suite/tests/expand/default_ty_param.rs
T
2019-11-24 17:25:44 -08:00

15 lines
250 B
Rust

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>,
}