2015-01-01 11:16:44 -05:00
|
|
|
trait From<Src> {
|
|
|
|
type Result;
|
|
|
|
|
|
|
|
fn from(src: Src) -> Self::Result;
|
|
|
|
}
|
|
|
|
|
|
|
|
trait To {
|
2018-07-10 23:10:13 +02:00
|
|
|
fn to<Dst>( //~ ERROR the size for values of type
|
2015-12-15 04:31:58 -05:00
|
|
|
self
|
2015-01-02 12:05:24 -08:00
|
|
|
) -> <Dst as From<Self>>::Result where Dst: From<Self> {
|
2015-12-15 04:31:58 -05:00
|
|
|
From::from(self)
|
2015-01-01 11:16:44 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|