Closed
Description
See https://gist.github.com/apoelstra/0c5e05a2d57a91be3c0b
Here I have a structure like
struct List<T> {
data: T,
next: Option<Box<List<T>>>
}
and am trying to implement a deserialization trait on it. When I try to call deserialize
on a Vec<u8>
to produce a List<u8>
say, rustc overflows, presumably chasing <T>
through an infinite chain of Option<Box<List<T>>>
s somehow.
Note that if the data
field and parameter <T>
are removed, there is no stack overflow.